You've got to factor in the diagonals - when the platoon is marching forward, and the dog is walking across the front or the back of the platoon, he won't be walking a straight line...in order to stay an equal distance from the platoon, he will be walking a diagonal line.
I can picture how to solve it in my head, but can't do all the math right now....you have to figure in the old right triangle formula.....once I'm done with these quarter-end schedules, I'll do the calcs.