Step 1: Check by division
Divide $x^8+x^4+1$ by $x^4+x^2+1$: the quotient is $x^4-x^2+1$ with no remainder.
Step 2: Differentiate the quotient
$\dfrac{d}{dx}(x^4-x^2+1)=4x^3-2x$.
Step 3: Match
So $a=4$, $b=-2$.
Final Answer:
The values are $a=4$ and $b=-2$.
\[ \boxed{\text{(B) }a=4,\,b=-2} \]