a)\(x^2+6x+9=x^2+3x+3x+9=x\left(x+3\right)+3\left(x+3\right)=\) \(\left(x+3\right)^2\)
b)\(x^2+\dfrac{2}{3}x+\dfrac{1}{9}=x^2+\dfrac{1}{3}x+\dfrac{1}{3}x+\dfrac{1}{9}=x\left(x+\dfrac{1}{3}\right)+\dfrac{1}{3}\left(x+\dfrac{1}{3}\right)=\) \(\left(x+\dfrac{1}{3}\right)^2\)