factor completely

Z^2 - 18Z + 81 - 25x^2

The first three terms are a perfect square, factor that.

Now, you have a new first term squared minus 25x^2, which is the difference of two squares.