<s>[INST] Minimizing $a_1x_1^2 + a_2x_2^2$ for positive $a_i$, where $a_1x_1+a_2x_2=B$ 
Find $$\min\{a_1x_1^2 + a_2x_2^2\}$$
Where $ a_1x_1 + a_2x_2 = B$, and $a_1>0$ and $a_2>0 $. Find $x_1$ and $x_2$.

Can we do it usig AG mean inequality?
Let's say we have the problem to find the minimum value of $ x_1^2 + x_2^2 $.
From: $ (x_1 - x_2)^2 ≥0  $,
$ x_1^2 + x_2^2 ≥ 2x_1x_2 $
So the minimum value is:  $2x_1x_2 $ for $x_1=x_2$.
Can be this done in a simillar manner for the starting problem.
why cannot we put $ x^2 =a_1 x_1^2, y^2 =a_2 x_2^2$ and solve it like root mean square inequality (without generalization?) We get:
$x^2 = y^2 $
.
$ a_1 x_1^2 = a_2 x_2^2 $
but not $x_1 = x_2$?
 [/INST] Going along your lines, we can write
\begin{align}
&a_1a_2(x_1-x_2)^2\ge0\\
\iff&a_1a_2(x_1^2+x_2^2)\ge 2a_1a_2x_1x_2\\
\iff&a_1^2x_1^2+a_2^2x_2^2+a_1a_2(x_1^2+x_2^2)\ge a_1^2x_1^2+a_2^2x_2^2+2a_1x_1a_2x_2\\
\iff&(a_1x_1^2+a_2x_2^2)(a_1+a_2)\ge(a_1x_1+a_2x_2)^2\\
\iff&a_1x_1^2+a_2x_2^2\ge\frac{B^2}{a_1+a_2}
\end{align}
This is the required lower bound.
</s>