ok, so
6x - x^2 = k
everytime x is increased by 1, 6x is increased by 6
everytime x is increased by 1, x^2 is increased by 2x+1, since,
(x+1)×(x+1)
=x(x+1)+1(x+1)
=x2+x+x+1
so we added 2x+1
I'll let you figure this out
p.s also trial and error will work just as fine