In fig., the blocks are of equal mass. The pulley
is fixed. In the position shown, A moves with a speed u and the speed of B is v. Then
v=u
v=u/cosθ
v=u/sinθ
v=u sinθ
See fig.
From figure
x2+y2=l2∴2xdxdt+2ydydt=2ldldt
There is not vertical motion of the block. Hence
dydt=0,dxdt=vx and dldt=vA=u
Hence 2×vx=2lu or xvx=lu
∴vx=lxu=ucosθ.