Find speed of the ball after collision.
Conserving the momentum of two balls before and after collision in horizontal direction
1×6=(1+1)×v
v=3 msec
Find speed of the trolley.
Given that trolley can move on frictionless surface at the time of maximum deflection.
Now at the instant of maximum deflection ball will be moving horizontal with same speed as of trolley (i.e,, velocity of ball w.r.t trolley will be 0),
Let it be v0.
By conservation of momentum,
2×3=(4+2)×v0
⇒v0=1m/s
Find deflection of the thread with vertical.
Now conserving energy.
12(m1+m2)v2 = 12(M+m1+m2)v20+mgl(1−cosθ)
12×2×32 =
12×6×12+2×10×1.5(1−cosθ)
⇒cosθ=0.8
⇒θ=37∘