Let $a,y \in \mathbb R$ such that $a>0$. Find the value of $y$ that maximises the expression $y(4-ay)$. Do not use calculus.
I think the question is about AGM and don't think there is a way to find the actual y value. So I try the AGM formula.
Why is my answer wrong?
The picture of the question and the answer:

To complete the square, $$y(4-ay)=4y-ay^2=-(ay^2-4y)$$$$=-a\left(y^2-4\dfrac ya\right)=-a\left(y^2-2\cdot \frac 2a\cdot y\right)$$$$=-a\left(y^2-2\cdot \frac 2a\cdot y+\frac{4}{a^2}-\frac{4}{a^2}\right)=\frac 4a-a\left(y-\frac 2a\right)^2$$
Now, this is an expression where a non-negative value is being subtracted from a positive number. It will attain its maximum value when the least possible value is subtracted from it. So to maximise the entire expression, we make the quantity being subtracted as $0$.
So the maxima occurs at $y=\dfrac 2a$ and the maximum value is $\dfrac 4a$.
Note: for a general quadratic expression $f(x)=ax^2+bx+c$, where $a,b,c\in \mathbb R, a<0$, the maximum value occurs for $y=-\dfrac {b}{2a}$ and the maximum value is $\dfrac {4ac-b^2}{4a}$.