The diagram at below shows the graph of
$$3x + 4y = 12.$$
The shaded figure is a square, three of whose vertices are on the coordinate axes. The fourth vertex is on the line.

Find
(a) the $x$- and $y$-intercepts of the line;
(b) the length of a side of the square.
I know how to find the $x$ and $y$ intercepts $(4,0)$ and $(0,3)$ (by plugging in $0$ for $x$ and $y$) And I have the equation to solve for part b : $4s+3s= 12$. ($s$ referring to side) but I do not know why that is the way to solve part b.
Let's call $s$ the lenght of the side of the square. Then you know that the right top point of the square has coordinates $(s,s)$.
You also know that the top right point of the square lies on the line, and you for every point $(x,y)$ on the line, you know that $3x+4y=12.$
Can you put these two pieces of knowledge together?