a) \(\left(x^4-x^2+2x-1\right):\left(x^2-x+1\right)=\left[x^2\left(x^2-x+1\right)+x\left(x^2-x+1\right)-\left(x^2-x+1\right)\right]:\left(x^2-x+1\right)=\left(x^2-x+1\right)\left(x^2+x-1\right):\left(x^2-x+1\right)=x^2+x-1\)
b) \(\left(x^3+1\right):\left(x^2-x+1\right)=\left[\left(x+1\right)\left(x^2-x+1\right)\right]:\left(x^2-x+1\right)=x+1\)