a. \(P=a^2+ab+b^2-3a-3b+1989\)
\(4P=4a^2+4ab+4b^2-12a-12b+7956\)
\(4P=\left(4a^2+4ab+b^2\right)-\left(12a+6b\right)+9+\left(3b^2-6b+3\right)+7944\)
\(4P=\left(2a+b\right)^2-2.3\left(2a+b\right)+3^2+3\left(b^2-2b+1\right)+7944\)
\(4P=\left(2a+b-3\right)^2+3\left(b-1\right)^2+7944\ge7944\)
\(\Rightarrow P\ge1986\)
\(\Rightarrow Min_P=1986\Leftrightarrow a=b=1\)