Hi Suezanna,
First of all you have a mistake in writing 2x2 + 13x2 + 21x units3,
because it is volume, so must be 2x3 + 13x2 + 21x units3,
Anyway, you know the volume of rectangular prism = height * area of base
SO factor of x in equation of volume 2x3 + 13x2 + 21x units3 is necessary
x( 2x^2 + 13x + 21) now you need change to multiple expression
x( 2x + 7 ) ( x + 3 )
As a result x, 2x + 7, x + 3 are the the lengths of each side of prism.
I hope it is useful,
Minoo