When you have a number raised to a number inside parenthesis and then raised to another number like (8^4)^5, you need to multiply the two powers together.
(8^4)^5 = 8^20
(7^3)^9 = 7^27
Sam's work is correct.