the average speed is given as:
[tex]v _{average} = \frac{v_1 + v_2 + v_3 + v_4}{t} [/tex]
where v average in this problem is 45mph
v1 = 40mph
v2 = 40mph
v3 = 40mph
t = 4hours
you are asked to find v4
by substituting the given values you'll have:
[tex]45 = \frac{40+40+40+v_4}{4} [/tex]
cross multiply 4 and add the values at the right side
180 = 120 + v4
v4 = 180 - 120
v4 = 60mph