draw a figure of the problem, check the picture attached.
Let C represent the position of the arm of Stacey, and E represent the position of the neck of the dog. Let B be the point such that CB=30 ft, and measure of angle CBE is 90 degrees.
The distance of Stacey from the dog is BE and can be found by the formula:



feet