a.
\(\left(x+3\right)A=\left(x-3\right)B\Rightarrow\dfrac{A}{B}=\dfrac{x-3}{x+3}\)
\(\Rightarrow\left\{{}\begin{matrix}A=x-3\\B=x+3\end{matrix}\right.\)
b.
\(\dfrac{x^2-16}{x+4}A=\left(x+4\right)B\Rightarrow\dfrac{\left(x-4\right)\left(x+4\right)}{x+4}A=\left(x+4\right)B\)
\(\Rightarrow\left(x-4\right)A=\left(x+4\right)B\)
\(\Rightarrow\dfrac{B}{A}=\dfrac{x-4}{x+4}\)
\(\Rightarrow\left\{{}\begin{matrix}A=x+4\\B=x-4\end{matrix}\right.\)