speeds are s_c for car, s_m for motorcycle.
time is 2
distance of car is:
d_c = d_m + 20, d_m is distance of motorcycle.
speed is defined as:
s = d/t, distance over time.
hence:
d_c/2 = s_c = d_m/2 + 10
s_c = s_m + 10
from problem statement we know:
s_c = 2s_m - 30
so we have 2 simultaneous equations:
s_c = s_m + 10
s_c = 2s_m - 30
multiply second by -1 and sum them both:
s_c = s_m + 10
-s_c = -2s_m + 30
-------------------------
0 = -s_m + 40
s_m = 40
that is the speed of the motorcycle
s_c = s_m + 10
s_c = 40 + 10
s_c = 50
that is the speed of car, both speeds in miles per hour