Potential Energy = Mass x Acceleration due to Gravity x Height above the ground.
As the girl comes down, she loses height, and hence loses Potential Energy.
So, the boy gaining height, and gains Potential Energy.
Gain in the Potential Energy of the boy = Loss in Potential Energy by the girl.
The energy lost by the girl is transferred to the boy and is gained by him.