By definition, you know that the volume of a rectangular prism is given by the formula
So, you can make a drawing to understand the procedure easier
Then you have
And so, for the other dimensions, you get
Therefore, the dimensions of the rectangular prism are 6 meters in length, 3 meters in width, and 9 meters height.