x^2 is a square number, it is x squared. 81 and 64 are also square numbers, 9 and 8 squared respectively. The method used to factorize the expressions is known as 'Difference of Two Squares'.
x^2-81 = (x-9)(x+9) since the +9x and -9x will cancel out.