a.
Đặt \(x+2y+1=a\)
\(\Rightarrow P=a^2+\left(a+4\right)^2=2a^2+8a+16=2\left(a+2\right)^2+8\ge8\)
\(P_{min}=8\) khi \(a=-2\) hay \(x+2y+3=0\)
b.
\(\sqrt{x}-1=a\ge0\Rightarrow\sqrt{x}=a+1\Rightarrow x=a^2+2a+1\)
\(Q=\dfrac{\left(a^2+2a+1\right)+\left(a+1\right)+1}{a}=\dfrac{a^2+3a+3}{a}=a+\dfrac{3}{a}+3\ge2\sqrt{\dfrac{3a}{a}}+3=3+2\sqrt{3}\)
\(Q_{min}=3+2\sqrt{3}\) khi \(a=\sqrt{3}\) hay \(x=4+2\sqrt{3}\)