X - hours that passed after 10 pm
(x+1) 36 = x * 42 | / 6
(x+1)6 = 7x
6x+6 = 7x |-6x
x=6
They will travel same distance at 4 am.
6/14
Multiply both 3 and 7 by 2, this gives you equivalent fractions (there are more possible equivalent equations of course)
Y-3=3(x-2)
y-3=3x-6 :-x=0
y-3=0-6
y=-6+3
y=-3