A block of mass m slides along a frictionless surface as shown in the figure. If it released from rest at A, what is its speed at B?