The volume of a Cube/Rectangular Prism is Length times Width times Height, (or for short L*w*h).
For a cube, the length, width, and height are equal. So the volume of a cube is L*L*L
In the question it says that the you know the length of one of the cubes sides, which is (x + 5).
So L = (x + 5).
So, the unsimplified expression is:
L * L * L
= (x + 5) (x + 5) (x + 5)
= (x^2 + 10x + 25)(x + 5)
= x^3 + 10x^2 + 25x + 5x^2 + 50x + 125
= x^3 + 15x^2 + 75x + 125