a: ĐKXĐ: a<>-1; a<>1; a<>-2;a<>0
\(P=\left(\dfrac{\left(a+2\right)\left(a+1\right)}{\left(a+2\right)\left(a-1\right)}-\dfrac{a^2+4}{\left(a-1\right)\left(a+1\right)}\right):\dfrac{a-1+a+1}{\left(a+1\right)\left(a-1\right)}\)
\(=\left(\dfrac{a+1}{a-1}-\dfrac{a^2+4}{\left(a-1\right)\left(a+1\right)}\right)\cdot\dfrac{\left(a+1\right)\left(a-1\right)}{2a}\)
\(=\dfrac{a^2+2a+1-a^2-4}{2a}=\dfrac{2a-3}{2a}\)
b: |P|=2/3 thì P=2/3 hoặc P=-2/3
P=2/3 thì 2a-3/2a=2/3
=>6a-9=4a
=>2a=9
=>a=9/2
P=-2/3 thì 2a-3/2a=-2/3
=>6a-9=-4a
=>10a=9
=>a=9/10