1)
По формуле a³-b³=(a-b)(a²+ab+b²)
(a+7)³ - 8 = (a+7) - 2³ = (a+7-2)·((a+7)² + (a+7)·2 + 2²) =
= (a+5)·(a²+ 14a+49 + 2a+14 + 4) =
= (a+5)·(a²+ 16a+67);
2)
По формуле a³+ b³=(a+b)(a²-ab+b²)
(а-12)³+ 27 = (a-12) + 3³ = (a-12+3)·((a-12)² - (a-12)·3 + 3²) =
= (a-9)·(a²- 24a+ 144 - 3a+36 + 9) =
= (a-9)·(a²- 27a+189).