You just need to plug those expressions inside the formula: it doesn't matter if they're expressions involving a variable instead of plain numbers: the formula becomes

If you want, you can simplify it by expanding the square and then multiply the two parenthesis:

Answer:
length: 2
width: 2
height: 2
Step-by-step explanation:
I'm assuming this is for a rectangular prism, because you didn't provide a picture.
Answer:
1, itself, and 5
Step-by-step explanation: