Let $f(x)=x^4-7x^3+9$
$D=\mathbb{R}$ ( $f(x)$ is continuos on $\mathbb{R}$)
//Prove $f(x)$ has at least 2 real roots//
We have:
$f(1) = 3 >0$; $f(2) = -31 <0$
$\therefore$ $f(x)$ has at least one real root between $1$ and $2$ (intermediate value theorem) $(1)$
$f(6) = -207 <0$; $f(7)=9>0$
$\therefore$ $f(x)$ has at least one real root between $6$ and $7$ (intermediate value theorem) $(2)$
From $(1)$ and $(2)$ ==> $f(x)$ has at least 2 real roots.
//Prove $f(x)$ has exactly 2 real roots//
Consider $f'(x)=0$ ==> $4x^3-21x^2=0$
<=> $x=0$ $\cup$ $x=\frac{21}{4}$
We have $f(0)=9 >0$ and $f(\frac{21}{4})=-\frac{62523}{256} <0$
==> $f(x)$ cannot has more than $3$ real roots.
However, the second root we've proved earlier (between $6$ and $7$) > $\frac{21}{4}$ (the graph of $f(x)$ is now increasing to infinity)
==> $f(x)$ has exactly 2 real roots ==> QED.
(I recommend you draw a graph on GeoGebra or Desmos to understand clearly)