The disk shown has weight 10 kg. Cylinder A and block B are attached to cords that are wrapped on the pulley as shown. The coefficient of kinetic friction between block B and the surface is 0.25. Knowing that the system is released from rest in the position shown, determine the total distance that block B moves before coming to rest.

I tried as

Let the tension in string attached to block B be T$_1$

$T_1 -f=5a_1$

torque equation $T_1/10=(10/100)\alpha$

$10\alpha = a_1$

For tensionin string attached to blockA $T_2$

force equation : 100$-T_2=10 a_2$

Torque equation : $T_2=(10/25)(\alpha )$

$\alpha =20a_2$

But solving this I am not getting the answer