To find the volume of the rectangular prism using the formula \( V = l \times w \times h \), we need to substitute the given dimensions into the formula.
The dimensions are:
- Length (\( l \)) = \( 5a \)
- Width (\( w \)) = \( 2a \)
- Height (\( h \)) = \( a^3 - 3a^2 + 2 \)
First, we will simplify the expression for the height:
\[ h = a^3 - 3a^2 + 2 \]
Now we can calculate the volume:
\[ V = l \times w \times h = (5a) \times (2a) \times (a^3 - 3a^2 + 2) \]
Calculating \( (5a) \times (2a) \):
\[ 5a \times 2a = 10a^2 \]
Now substituting this back into the volume formula gives:
\[ V = 10a^2 \times (a^3 - 3a^2 + 2) \]
Next, we need to distribute \( 10a^2 \) across the polynomial \( (a^3 - 3a^2 + 2) \):
\[ V = 10a^2 \cdot a^3 - 10a^2 \cdot 3a^2 + 10a^2 \cdot 2 \]
Calculating each term:
- \( 10a^2 \cdot a^3 = 10a^{5} \)
- \( -10a^2 \cdot 3a^2 = -30a^{4} \)
- \( 10a^2 \cdot 2 = 20a^2 \)
Now we combine these results:
\[ V = 10a^{5} - 30a^{4} + 20a^{2} \]
So, the volume of the rectangular prism is:
\[ \boxed{10a^{5} - 30a^{4} + 20a^{2}} \]