The kinetic energy of a moving object is Ek = 0.5 × m × v2, where m is mass in kilograms and v is speed in metres per second. Energy is in joules, J. A 2 kg trolley moving at 3 m/s has 0.5 × 2 × 32 = 9 J.
The elastic potential energy stored in a stretched spring is Ee = 0.5 × k × e2, where k is the spring constant in N/m and e is the extension in metres. This only works if the limit of proportionality has not been exceeded. A spring with k = 40 N/m stretched by 0.1 m stores 0.5 × 40 × 0.12 = 0.2 J. Because the extension is squared, doubling the extension makes the energy four times larger.
The gravitational potential energy gained by an object raised above the ground is Ep = m × g × h, where g is the gravitational field strength in N/kg and h is the height in metres. In a calculation the value of g is given, for example 10 N/kg. Raising a 0.5 kg ball by 4 m gives 0.5 × 10 × 4 = 20 J. If the ball is dropped, this energy is transferred to its kinetic store as it falls, which you can investigate in the lab by timing a falling object.