
William W. answered 09/11/19
Math and science made easy - learn from a retired engineer
Spring potential energy is calculated based on the stiffness of the spring and the amount the spring is compressed. The equation is P E = 1/2kx2 where k is the spring constant (measure of stiffness, if you will) and x is the amount the spring is compressed from the neutral position.
Ramp potential energy is calculated based on the height of the ramp and the weight of the object. The equation is P E = mgh where m*g is the object's mass times the acceleration due to gravity (or the object's weight) and h is the height of the ramp.
In your case, these are the same so that means there is a combination of the product of ramp height and object mass is equal spring constant and spring compression.
Do you have more to go on (object mass, spring constant, etc)?