First:

x^2 - 4ax = 5a^2

Now, we want to add a constant to this such that the LHS is a perfect square:

(x + b)^2 = x^2 + 2bx + b^2

So comparing the linear term in this to the equation above I get that

-4a = 2b, thus b = -2a

So we wish to add b^2 = (-2a)^2 = 4a^2 to both sides:

x^2 - 4ax + 4a^2 = 5a^2 + 4a^2

(x - 2a)^2 = 9a^2

x - 2a = (+/-)3a

x = 2a (+/-) 3a

So x = 5a or x = -a.

-Dan