If the ball hits the truck, for the horizontal motion of truck and ball,
Displacement of ball in horizontal = Displacement of truck in horizontal direction
vcos30o×(t−2)=12at2
For the vertical motion of ball, the vertical displacement should be zero
vsin30o×(t−2)−12g(t−2)2=0
⇒(t−2)=2vsin30g=vg⇒t=2+vg
√32×vg=12a(2+vg)2
√3v2g=a(2+vg)2⇒a=√3v2g(2+vg)2