The short answer is that the product of compact sets is compact, and a continuous function with compact domain has such points.

But I think you're probably building up to that theorem. I think the idea here is to continue the process: take the rectangle where the supremum of f occurs, and divide it again, and so on. You'll then be able to define a Cauchy sequence in IxJ, which converges since ... and the value of f at the limit point is ...