Here the component of velocity of swimmer in AB direction is always Vmcosθ.
As the swimmer crosses the river of breadth 20m in 10sec we can write
10* Vmcosθ.=20
=> Vmcosθ.=2........[1]
Again the net displacement along the stream is zero and each 10m breadth is crossed by the swimmer in 5sec.
So we can write
(Vmsinθ.-10)*5 +(Vmsinθ.-20)*5=0
=> 2Vmsinθ.= 30
=> Vmsinθ.= 15.....[2]
Dividing [2] by [1] we get
=> tanθ= 15/2
=> θ.= tan-1(15/2)