Consider $f(x) = x^2-6x+9$ , $y=x+2$ and $y=8-x$. If we want to draw a rectangle with two vertices on $f(x)$ and the other two vertices are on $y=x+2$, $y=8-x$. What the largest possible area of such a rectangle.
If we have an edge parallel to the x-axis this question is easy but what about the other case?
I think the other case is impossible, but I could not fund out why.
My attempt
Let $a(x_1,y_1) , b(x_2,y_2)$ the two vertices on $f(x)$ and $c(x_3,y_3), d(x_4,y_4)$ the other two on the lines $y=8-x, y= x+2$. I want to show that if $ab = cd$ and $ab // cd$ with $<abc = 90$ we should get the slope of $ab=0$.
Any hints. Thanks in advance.

You can have a rectangle even if $AB$ is not parallel to the $x$-axis. To see that, take two points $A=(x_A,x_A^2)$ and $B=(x_B,x_B^2)$ on the parabola $y=x^2$, find the equations of the perpendiculars to line $AB$ through $A$ and $B$ and the intersection points $C$, $D$ between them and lines $y=5\pm x$ (I translated everything by $-3$ along $x$ for simplicity).
By imposing line $CD$ to be parallel to $AB$ one gets an equation, which is satisfied if $x_A+x_B=0$ or if $$ u^2=18+4t-t^2, $$ where $u=x_A+x_B$ and $t=x_A-x_B$. This is the "other" solution we were after.
I represented this with an interactive GeoGebra diagram. The slider gives the value of $t$: notice that only a limited range of values are allowed, corresponding to $18+4t-t^2\ge0$.
EDIT.
As noticed by Mick in the comment below I didn't care about the original request that the rectangle must be enclosed between lines and parabola: I only showed that slanted rectangles exist, having two of their vertices on the parabola and the others on the lines. It turns out that the largest slanted rectangle enclosed between lines and parabola is the one represented in the diagram below (and of course its symmetric), with a vertex at the intersection point between a line and the parabola. Its area, however, is only of about $5.5$, less than the largest "straight" rectangle, which has an area of $6$.