Relative velocity of car A w.r.t. car B is :
VAB = VB -VA = 0
So, relative separation between two cars A and B remains constant at all instants.
If VC is the velocity of car C w.r.t to ground in the opposite direction to car A and car B, then relative velocity of car C relative to car A or B will be,
Vrel = VC - (-30) = (VC + 30 ) km/hr
Time taken by car C to cross cars A and B is
t = d/vrel = 5/ (VC + 30)
4/3600 hr= 5 km/ (VC + 30) km/hr (as 1hr = 3600 s)
on solving we get , velocity of car C, VC = 4470 km/hr