A gardener decides to lay out his cabbage patch as a square grid. He has a lot of cabbages
so cannot be bothered to count them, but lays them out on the ground. On completing his
square, he finds he has 9 left over. He then lays them out again with one extra cabbage on
each side of the grid. He then finds that he is 12 cabbages short.
How many cabbages has he?
Thanks in advance.