Answer:
Remember that Kinetic energy is a scalar quantity and it only depends on the speed and not necessary not the angle
Thus,Since the masses and the speed are same for both A and B, the initial kinetic energy of A and B are same.
b]
The difference or variation in gravitational potential energy is again a scalar quantity and so as long as the initial speed is same, the change in gravitational potential energy will also be the same [though they may not occur at the same horizontal position].
therefore, from the ground to the highest point of both A and B, both will have same potential energy.
Also The energy in part (a) differs from part (b),
In part (a) energy mention is kinetic energy that depends on mass and velocity of particle whereas in part (b) energy is potential energy that depends on mass and the position with reference of ground. Potential energy is a state function but kinetic energy is not.