Except 0, any EXPRESSION/VALUE that's raised to the 0 power = 1
Therefore,
(x - 5)(x - 4) = 0 =====>
Also (as an addition to the @MathTutor's solution) if the base x^2 - 7x + 7 = 1, then any degree of the base is 1. x^2 - 7x + 7 = 1 ====> x^2 -7x + 6 = 0 ====> (x-6)*(x-1) = 0 ====> the roots are x= 6 and x= 1.