a) \(\dfrac{\left(x+2\right)P}{x-2}=\dfrac{\left(x-1\right)Q}{x^2-4}\)
\(\Leftrightarrow\left(x^2-4\right)\left(x+2\right)P=\left(x-2\right)\left(x-1\right)Q\)
\(\Leftrightarrow\)\(\left(x+2\right)^2\left(x-2\right)P=\left(x-2\right)\left(x-1\right)Q\)
\(\Leftrightarrow\)\(\left(x+2\right)^2P=\left(x-1\right)Q\)
\(\Leftrightarrow P=x-1\)
\(Q=\left(x+2\right)^2=x^2+4x+4\)
b)\(\dfrac{\left(x+2\right)P}{x^2-1}=\dfrac{\left(x-2\right)Q}{x^2-2x+1}\)
\(\Leftrightarrow\left(x-1\right)^2\left(x+2\right)P=\left(x+1\right)\left(x-1\right)\left(x-2\right)Q\)
\(\Leftrightarrow\left(x-1\right)\left(x+2\right)P=\left(x+1\right)\left(x-2\right)Q\)
\(\Leftrightarrow P=\left(x+1\right)\left(x-2\right)=x^2-x-2\)
\(Q=\left(x-1\right)\left(x+2\right)=x^2+x-2\)