Remember that the area of a rectangle can be expressed as
Area = (Length)(Width)
or
A = (L)(W)
So let's plug in the values given to us,
A = 3x^2 + 12x and W = 3x
This gives us,
3x^2 + 12x = (L)(3x)
Now let's solve for L by dividing both sides by 3x,
x + 4 = L
So the length is x + 4