If i m nt wrong then \theta is the angle made by the velocity vectorof the ball with the x-axisin that frame...
then clearly \theta=45° (rel. vel of ball wrt trolley must be along OA to hit the trolley)
hence \phi = 4\theta /3 = 60°
let v be the vel of ball
vx= v/2 and vy=√3v/2
now (vel of ball wrt trolley)x = v/2 (vtrolley x=0)
(vel of ball wrt trolley)y = √3v/2 - (√3-1)
tan\theta=√3v/2 - (√3-1)v/2
which gives v=2m/s