Find the largest value of $P=\frac{3x+2y+1}{x+y+6}$ I know there has been a similar question here, but my question is a little bit different
The Problem:
Given that $3(x+y)=x^2+y^2+xy+2$,
then find the maximum value of
\begin{align}
P=\frac{3x+2y+1}{x+y+6}
\end{align}
What I was thinking about is that I'm trying to transform P into a first-degree equation on $x$, which is totally possible using the condition in the problem, and then apply the basic Cauchy inequalities.
However, I haven't been able to figure it out. The other possibility is to apply differentiation like in the problem I mentioned at the beginning of the question. The problem is that I took this problem from Olympiad training, which often does not use differentiation (so there should be a way that doesn't use the method)
So any help is appreciated

$3(x+y)=x^{2}+y^{2}+xy+2$ must be a conic section because it can be written in the form $Ax^2+Bxy+Cy^2+Dx+Ey+F = 0$. It also is symmetric across the line $y=x$ as it is invariant after swapping $x$ and $y$.
Now if the maximum value is $P$, then $3x+2y+1 = P(x+y+6)$, equation $1$. This can be seen below:

If we can rotate this ellipse by $45º$, we can write it in parametric form in terms of an angle $\theta$. Using the rotation matrix and a scaling factor, we need the transformation $x \to x - y, y \to x + y$ as $\cos \pi/4 = \sin \pi/4$:
$$3(x-y + x+y) = (x-y)^2 + (x+y)^2 + (x-y)(x+y) + 2$$
$$6x = 2(x^2 + y^2) + (x^2-y^2) + 2$$
$$6x = 3x^2 + y^2 + 2 \tag{2}$$
where from $(1)$, we now have:
$$3(x-y) + 2(x+y) + 1 = P \left( (x-y) + (x+y) + 6 \right)$$
$$5x-y+1 = P(2x+6)$$
$$y = (5-2P)x-6P+1 \tag{3}$$
Just to check, the lines are still tangent to the ellipse after transformation:

and now we can substitute $(3)$ into $(2)$:
$$6x = 3x^2 + ((5-2P)x-6P+1)^2 + 2$$
$$6x = 3x^2 + (25-20P+4P^2)x^2 + 2(5-2P)(-6P+1)x + 36P^2-12P+1+2$$
$$(28-20P+4P^2)x^2 + (24P^2-64P+4)x + 36P^2-12P+3 = 0$$
$$\Delta = 0: (24P^2-64P+4)^2 - 4(28-20P+4P^2)(36P^2-12P+3) = 0$$
$$4(6P^2-16P+1)^2 - 48(7-5P+P^2)(P^2-4P+1) = 0$$
and miraculously, this is a quadratic $-752P^2 + 1072P - 320 = 0 \implies (47-20P)(P-1) = 0$, so the maximum value is $P = 1$.
