I suppose everyone tires of hearing me work through my thoughts by now, but I always try to find the cleanest, minimal proof of anything, and I realized there’s no need to invoke the line distance formula in proving this:
Let’s say a lattice line is any line which passes through two (and therefore infinitely many regularly spaced) lattice points, a lattice-line square is one whose sides lie along lattice lines, and a lattice-point square is one whose corners lie on lattice points.
Given any lattice line, consider the grid formed by all parallel and perpendicular lattice lines, thus carving up the plane into lots of little cells. Lattice-line squares along this grid consist of, well, squares built out of these cells.
But also, in particular, each cell lies in (in fact, along an edge of) some lattice-point square built out of cells (because each lattice line can be followed far enough in any direction till one ends up at one of its regularly spaced lattice points).
So the area of any lattice-line square is a square multiple of the corresponding cell-area, and also, the area of some lattice-point square (which is by definition a “hypotenuse number”; i.e., our slight misnomer for a sum of two squares) is a square multiple of that same cell-area.
So each lattice-line square’s area is a hypotenuse number divided by a square and multiplied by a square. In other words, a lattice-line square’s area times some square is a lattice-point square’s area times some square.
The last fact we need is that if two whole numbers are in square ratio, and one is a hypotenuse number, then so is the other. One direction of this is trivial, while the other direction requires (as far as I can tell) the less elementary analysis (by, e.g., Gaussian prime factorization) of what kinds of integers are hypotenuse numbers. But with that, we are done.