Đáp án:
$\begin{array}{l}
a)Dkxd:\left\{ \begin{array}{l}
4{x^2} - 1\# 0\\
8{x^3} + 1\# 0
\end{array} \right. \Leftrightarrow \left\{ \begin{array}{l}
x\# \dfrac{1}{2}\\
x\# - \dfrac{1}{2}
\end{array} \right.\\
P = \dfrac{{2{x^5} - {x^4} - 2x + 1}}{{4{x^2} - 1}} + \dfrac{{8{x^2} - 4x + 2}}{{8{x^3} + 1}}\\
= \dfrac{{\left( {2x - 1} \right)\left( {{x^4} - 1} \right)}}{{\left( {2x - 1} \right)\left( {2x + 1} \right)}} + \dfrac{{2\left( {4{x^2} - 2x + 1} \right)}}{{\left( {2x + 1} \right)\left( {4{x^2} - 2x + 1} \right)}}\\
= \dfrac{{{x^4} - 1}}{{2x + 1}} + \dfrac{2}{{2x + 1}}\\
= \dfrac{{{x^4} + 1}}{{2x + 1}}\\
b)P = 6\\
\Leftrightarrow \dfrac{{{x^4} + 1}}{{2x + 1}} = 6\\
\Leftrightarrow {x^4} + 1 = 12x + 6\\
\Leftrightarrow {x^4} - 12x - 5 = 0\\
\Leftrightarrow {x^4} - 2{x^3} - {x^2} + 2{x^3} - 4{x^2} - 2x + 5{x^2} - 10x - 5 = 0\\
\Leftrightarrow {x^2}\left( {{x^2} - 2x - 1} \right) + 2x\left( {{x^2} - 2x - 1} \right) + 5\left( {{x^2} - 2x - 1} \right) = 0\\
\Leftrightarrow \left( {{x^2} - 2x - 1} \right)\left( {{x^2} + 2x + 5} \right) = 0\\
\Leftrightarrow {x^2} - 2x - 1 = 0\\
\left( {do:{x^2} + 2x + 5 = {{\left( {x + 1} \right)}^2} + 4 > 0} \right)\\
\Leftrightarrow {x^2} - 2x + 1 = 2\\
\Leftrightarrow {\left( {x - 1} \right)^2} = 2\\
\Leftrightarrow x = 1 \pm \sqrt 2 \left( {tmdk} \right)\\
Vậy\,x = 1 \pm \sqrt 2
\end{array}$