a) \(a^2x+x=2a^4-2\)
\(\Rightarrow x\left(a^2+1\right)=2\left(a^4-1\right)\)
\(\Rightarrow x\left(a^2+1\right)=2\left(a^2+1\right)\left(a^2-1\right)\)
\(\Rightarrow x=\frac{2\left(a^2+1\right)\left(a^2-1\right)}{a^2+1}=2\left(a^2-1\right)=2a^2-2\)
b) \(a^2x+3ax+9=a^2\)
\(\Rightarrow a^2x+3ax=a^2-9\)
\(\Rightarrow ax\left(a+3\right)=\left(a+3\right)\left(a-3\right)\)
\(\Rightarrow x=\frac{\left(a+3\right)\left(a-3\right)}{a\left(a+3\right)}=\frac{a-3}{a}\)