Từ \(\frac{a^2+b^2}{a-2b}=2\Rightarrow a^2+b^2=2\left(a-2b\right)\)
\(\Leftrightarrow a^2+b^2=2a-4b\)
\(\Leftrightarrow a^2+b^2+4b=2a\)
\(\Leftrightarrow a.a+b.b+4b=2.a\)
\(\Leftrightarrow a.a+b\left(b+4\right)=2.a\)
\(\Leftrightarrow2.a-a.a=b\left(b+4\right)\)
\(\Leftrightarrow\frac{a}{b}=\frac{b+4}{2-a}\)
Mà muốn P lớn nhất thì a,b phải lớn nhất \(\Rightarrow a=b+4;b=2-a\)
\(\Leftrightarrow a+b=2\Leftrightarrow b+4+b=2\Leftrightarrow2b=-2\Rightarrow b=-1;a=3\)
\(\Rightarrow P=8a+4b=24-4=20\)