I am going to factor a similar expression, 8x3 - 27y3
Much of factoring has to do with pattern recognition, looking at an expression or pattern and recognizing something. In the expression 8x3 - 27y3 what I see is that everything is a cube
x3 and y3 are cubes but also 8 = 23 and 27 = 33
8x3 - 27y3 = (2x)3 - (3y)3
I know how to factor a difference of cubes
a3 - b3 = (a - b)(a2 + ab + b2)
(2x)3 - (3y)3 = (2x - 3y)( 4x2 + 6xy + 9y2)
Now try your two problems.