Concept:
Whenever a question involves roots of a quadratic equation and asks for expressions such as \(\alpha^2+\beta^2\), \(\alpha^3+\beta^3\), \(\frac{1}{\alpha}+\frac{1}{\beta}\), etc., it is generally unnecessary to find the roots explicitly. Instead, we use Vieta's formulas which directly relate the roots of a quadratic equation to its coefficients.
For a quadratic equation
\[
ax^2+bx+c=0,
\]
having roots \(\alpha\) and \(\beta\),
\[
\alpha+\beta=-\frac{b}{a}
\]
and
\[
\alpha\beta=\frac{c}{a}.
\]
After obtaining these values, standard algebraic identities can be used to evaluate higher powers of the roots. This approach is faster, more elegant, and avoids lengthy calculations.
Step 1: Identify the given quadratic equation.
The given equation is
\[
x^2-3x+1=0.
\]
Comparing with the standard form
\[
ax^2+bx+c=0,
\]
we obtain
\[
a=1,\qquad b=-3,\qquad c=1.
\]
Step 2: Apply Vieta's formulas.
Using
\[
\alpha+\beta=-\frac{b}{a},
\]
we get
\[
\alpha+\beta=-\frac{-3}{1}=3.
\]
Similarly,
\[
\alpha\beta=\frac{c}{a}
=\frac{1}{1}
=1.
\]
Thus,
\[
\alpha+\beta=3
\]
and
\[
\alpha\beta=1.
\]
Step 3: Recall the identity for cubes.
The standard identity is
\[
\alpha^3+\beta^3
=
(\alpha+\beta)^3
-
3\alpha\beta(\alpha+\beta).
\]
This identity allows us to calculate the required value directly.
Step 4: Substitute the known values.
Substituting
\[
\alpha+\beta=3
\]
and
\[
\alpha\beta=1,
\]
we obtain
\[
\alpha^3+\beta^3
=
3^3
-
3(1)(3).
\]
\[
=
27-9.
\]
\[
=
18.
\]
Step 5: Verification.
The computed value is
\[
18.
\]
Since all calculations have been performed using exact identities and Vieta's formulas, the result is completely consistent with the given quadratic equation.
Step 6: Final Conclusion.
Therefore,
\[
\boxed{\alpha^3+\beta^3=18}
\]
Hence the correct answer is
\[
\boxed{\text{Option (B)}}.
\]