Answer:
A.when it reaches the top of its flight
Step-by-step explanation:
The potential energy of an object is given by:

where
m is the mass of the object
g is the acceleration of gravity
h is the heigth at which the object is located above the ground
Therefore, we see that the higher the object, the larger its potential energy: this means that the ball will have the greatest potential energy at the top of its trajectory.