Source of the problem: Mathematics Education Innovation
Let $k>0$ be some real constant and consider $f_k(x) = x^3 - k \, x$ for real $x$. Then one can show that for $k \geq \sqrt{8}$ there is a (tilted) square centered at $(0,0)$ with all its corners on the graph of $f_k$. (For $k=\sqrt{8}$ there is exactly one such square, for $k>\sqrt{8}$ there are two.) This minimal $k$ can be derived from a computation with resultants or Gröbner bases on the system of equations $$f_k(x)-y, \ f_k(y)+x, \ (3x^2 - k)(3y^2 - k)+1$$ and using $x,y \neq 0$ where required. (The third equation expresses that the curves given by the first two equations touch in a corner of the square.)
Now for the actual question: how could $k=\sqrt{8}$ be derived using only high school level mathematics? This is not a very precise question, but resultants and Gröbner bases are definitely out. Equations of “high” degree without apparent structure should be avoided as well.
Playing with the equations above leads to many derived equalities but getting rid of $x$ and $y$ by just playing around is not so simple it seems. (One such equation is $k^2=3x^2 y^2-1$ which suggests to somehow derive $x^2y^2=3$.)
Any method is acceptable by the way, it doesn’t have to be purely algebraic as sketched above. Here’s a nice picture for $k=\sqrt{8}$.

Here is how I would do it.
Consider a pair of perpendicular lines passing through the origin, rendered here as $y=mx$ and $y=-x/m$. Combining each of these linear equations with $y=x^3-kx$ gives in turn the following non-origin intersections, where $L$= length if the "diagonal" between each pair of intersections:
$y=mx \rightarrow x_1=\pm\sqrt{k+m},L_1=2\sqrt{(1+m^2)(k+m)}$
$y=-x/m \rightarrow x_2=\pm\sqrt{k-(1/m)},L_2=\frac{2\sqrt{(1+m^2)(k-(1/m))}}{|m|}$
To make a square we then just render the diagonal congruent, thus $L_1=L_2$. After removing common factors, clearing fractions and squaring we ultimately arrive at a polynomial equation:
$m^4+km^3-km+1=0$
This looks ugly, but note that any line which solves this equation for a given $k$ must be accompanied by its perpendicular line. Then the quartic polynomial in the slope $m$ must have pairs of roots with product $-1$ forcing this factorization:
$m^4+km^3-km+1=(m^2+am-1)(m^2+bm-1)=0$
Matching both cubic and linear terms then gives $a+b=k$, while matching quadratic terms yields $ab=2$.
Now to get a single pair of perpendicular lines, corresponding to a single "inscribed" square, we need $a=b$ making the factors identical. Then from the matching equations given above either
$a=b=\sqrt{2},k=2\sqrt{2}$
or
$a=b=-\sqrt{2},k=-2\sqrt{2}$.
The second root gives no square in the real plane; instead the vertices of that square have imaginary coordinates. The first root is the one giving a single square in the real plane. The corresponding slopes of the lines for this case, obtained by solving $m^2+(\sqrt{2})m-1=0$, are $m=(-\sqrt{2}\pm\sqrt{6})/2$.