Answer :
Relative Velocity, aVb:
[tex]{ \bf{ _{A} V_{B} =V_{A} - V_{B} }} \\ _{A} V_{B} = 30 - 40 \\ _{A} V_{B} = - 10 \: {ms}^{ - 1} \\ |_{A} V_{B}| = 10 \: {ms}^{ - 1} [/tex]
Relative displacement:
[tex] = \frac{ |_{A} V_{B}| }{time} \\ \\ = \frac{10}{4} \\ = 2.5 \: metres[/tex]