If (n+a) is squared, we get n^2 + 2na + a^2.
So, if n^2-12kn+r is a perfect square, then we can equate n^2 + 2na + a^2 witrh n^2 - 12kn + r, and by comparing coefficients we get
2a = -12k ------ (1)
a^2 = r -------- (2)
from (1), a = -6
putting a = -6 into (2) gives us r = 36. If the given trinomial is a perfect square, then that square is
(n - 6)^2