a) ĐKXĐ: \(x\notin\left\{3;-3;-2\right\}\)
Ta có: \(P=\left(\dfrac{2x-1}{x+3}-\dfrac{x}{3-x}-\dfrac{3-10x}{x^2-9}\right):\dfrac{x+2}{x-3}\)
\(=\left(\dfrac{\left(2x-1\right)\left(x-3\right)}{\left(x+3\right)\left(x-3\right)}+\dfrac{x\left(x+3\right)}{\left(x-3\right)\left(x+3\right)}-\dfrac{3-10x}{\left(x-3\right)\left(x+3\right)}\right):\dfrac{x+2}{x-3}\)
\(=\dfrac{2x^2-6x-x+3+x^2+3x-3+10x}{\left(x-3\right)\left(x+3\right)}:\dfrac{x+2}{x-3}\)
\(=\dfrac{3x^2+6x}{\left(x-3\right)\left(x+3\right)}:\dfrac{x+2}{x-3}\)
\(=\dfrac{3x\left(x+2\right)}{\left(x-3\right)\left(x+3\right)}\cdot\dfrac{x-3}{x+2}\)
\(=\dfrac{3x}{x+3}\)
b) Ta có: \(x^2-7x+12=0\)
\(\Leftrightarrow x^2-3x-4x+12=0\)
\(\Leftrightarrow x\left(x-3\right)-4\left(x-3\right)=0\)
\(\Leftrightarrow\left(x-3\right)\left(x-4\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-3=0\\x-4=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=3\left(loại\right)\\x=4\left(nhận\right)\end{matrix}\right.\)
Thay x=4 vào biểu thức \(P=\dfrac{3x}{x+3}\), ta được:
\(P=\dfrac{3\cdot4}{4+3}=\dfrac{12}{7}\)
Vậy: Khi \(x^2-7x+12=0\) thì \(P=\dfrac{12}{7}\)