Lời giải:
Áp dụng BĐT Bunhiacopxky:
$90^2=(\sqrt{a+2022}+\sqrt{b+2022})^2\leq (a+2022+b+2022)(1+1)=2(a+b+4044)$
$\Rightarrow a+b\geq 6$
Khi đó:
$P=a^2-ab+b^2=\frac{1}{4}(a+b)^2+\frac{3}{4}(a-b)^2\geq \frac{1}{4}(a+b)^2\geq \frac{1}{4}.6^2=9$
Vậy $P_{\min}=9$ khi $a=b=3$