the energy has to be conserved thus the final energy level will always be equal to the initial state .. the initial state has 90j of potential energy and 10j of kinetic energy the total energy is equal to = 100j .
now for the second condition the kinetic energy is 90j and the total energy is 100j thus 100j-90j = 10j of potential energy