When the plank begins to tip upwards, the left support no longer exerts any upward reaction on the plank. At this moment, the only upward force is by the virtue of the right support. The given free-body diagram shows the forces acting on the plank:
In the given free-body diagram, x is the distance of the dog from the right support.
At equilibrium, the sum of all clockwise torques will be equal to the sum of all the anti-clockwise torques. Taking torque about the right support, we get
500×5=625×x
x=500×5625=4m
Hence, point P is located (4 + 5) = 9 m from the centre of gravity of the plank i.e., the dog has travelled a distance of 9 m on the horizontal plank.