In order to understand this problem it is essential to draw a figure.
As described triangle APD is a right triangle and the median AD is the hypotenuse.
Since the length of GD is 2.5, the length of AD is 7.5.; the length of AP (one leg of the right triangle) is given as 6..
Therefore, PD = sqrt(7.5^2 - 6^2)=sqrt(20.25)=4.5