8. 若 $\tan \left(\theta+\frac{\pi}{4}\right)=3$, 则 $5 \sin ^{2} \theta-3 \sin \theta \cos \theta+2 \cos ^{2} \theta=$
$\tan \theta=\tan \left[\left(\theta+\frac{\pi}{4}\right)-\frac{\pi}{4}\right]$
$=\frac{\tan \left(\theta+\frac{\pi}{4}\right)-\tan \frac{\pi}{4}}{1+\tan \left(\theta+\frac{\pi}{4}\right) \cdot \tan \frac{\pi}{4}}=\frac{1}{2}$

$\therefore$ 原式 $=\frac{5 \sin ^{2} \theta-3 \sin \theta \cos \theta+2 \cos ^{2} \theta}{\sin ^{2} \theta+\cos ^{2} \theta}$

$=\frac{5 \tan ^{2} \theta-3 \tan \theta+2}{\tan ^{2} \theta+1}=\frac{7}{5}$.

答案: $\frac{7}{5}$