a)
\(P=\dfrac{x^{10}-x^8+x^6-x^4+x^2-1}{x^4-1}\)
\(=\dfrac{x^8\left(x^2-1\right)+x^4\left(x^2-1\right)+\left(x^2-1\right)}{\left(x^2-1\right)\left(x^2+1\right)}\)
\(=\dfrac{\left(x^2-1\right)\left(x^8+x^4+1\right)}{\left(x^2-1\right)\left(x^2+1\right)}\)
\(=\dfrac{x^8+x^4+1}{x^2+1}\)
b)
\(Q=\dfrac{x^{40}+x^{30}+x^{20}+x^{10}+1}{x^{45}+x^{40}+x^{35}+...+x^{10}+x^5+1}\)
\(=\dfrac{x^{40}+x^{30}+x^{20}+x^{10}+1}{\left(x^{45}+x^{35}+...+x^5\right)+\left(x^{40}+x^{30}+...+1\right)}\)
\(=\dfrac{x^{40}+x^{30}+x^{20}+x^{10}+1}{x^5\left(x^{40}+x^{30}+...+1\right)+\left(x^{40}+x^{30}+...+1\right)}\)
\(=\dfrac{x^{40}+x^{30}+x^{20}+x^{10}+1}{\left(x^{40}+x^{30}+...+1\right)\left(x^5+1\right)}\)
\(=\dfrac{1}{\left(x^5+1\right)}\)