I've added an attachment to this post to explain the problem.

Two carts, A and B, are connected by a rope 39 feet long that passes over a pulley P. The point Q is on the floor h = 12 ft directly beneath P and between the carts. Cart A is being pulled away at a speed of 2.5 ft/s. How fast is cart B moving toward Q at the instant when cart A is 5 ft from Q. (round to 2 decimal places)

From the problem, I know the following things:

PQ = h = 12

AQ = 5

AP = 13 (by Pythagoras)

APB = 39

PB = 39-13 = 26

QB = $\displaystyle 2\sqrt{133}$ (by Pythagoras)

(work to follow in next posting for organization)