The volumes of the two cubes are x3 and y3.
The figure models the binomial
x3 + y3.
three prisms described in the second hint are shown below.
volume of the light gray prism is y2(x
The volume of the dark gray prism is xy(x - y).
The volume of the white prism is x2(x -
x3 + y3 can be factored as (x
+ y)(x2 - xy + y2).