The thing to do first is to find the time when they are closest.

Since the dog is moving at 2 m/s, her distance is (15-2t).

The squirrels distance is 4t

Therefore the time they're closest together is by ol' Pythagoras.

After 3/2 seconds they are closest together.

If the dog is moving at 2 m/s for 3/2 seconds then she moves 3 feet.

Therefore, she is 15-2(3/2)=12 feet from the tree.

The squirrel is 4(3/2)=6 feet up the tree,

The distance between them along the hypoteneuse is