Hint $\rm\:f(x) = ax^2\!+\!bx\!+\!c,\ a\ne 0\:$ and $\rm\:f(x) = f(y) = f(z)\:$ implies following determinant $= 0$, having proportional first and last columns
$$\rm 0\, =\, \left | \begin{array}{ccc}
\rm f(x) &\!\! \rm x &\!\! 1 \\
\rm f(y) &\!\! \rm y &\!\! 1 \\
\rm f(z) &\!\! \rm z &\!\! 1
\end{array} \right |
\, =\,
\left | \begin{array}{ccc}
\rm ax^2&\!\!\! \rm x &\!\!\! 1 \\
\rm ay^2 &\!\!\rm y &\!\!\! 1 \\
\rm az^2 &\!\! \rm z &\!\!\! 1
\end{array} \right | \, =\, aV(x,y,z)\, =\, a\,(x\!-\!y)(y\! -\! z)(z\!-\!x)\qquad $$
where $\rm\,V\,$ denotes that Vandermonde determinant, e.g. see this answer or Wikipedia.
Thus, if the coefficient ring is a field (or domain), one of the RHS factors must be $0$. Since $\rm\:a\ne 0\:$ one of the other factors $= 0,\:$ i.e. the roots are not distinct.
Alternatively we can iterated the Factor Theorem as here.
Remark $ $ That the second $\det$ equals the first follows from the fact that the first columns are congruent modulo the others. More precisely, the second $\det$ arises simply by applying the elementary col operation $\rm\: col_1 \leftarrow col_1 - b\cdot col_2 - c\cdot col_3,\,$ to get $\rm\,f(x) - b\cdot x - c\cdot 1 = ax^2,\:$ etc. The same argument works for higher degree polynomials. For the general case, it helps to know that the rhs matrix, after removing the factor of $\rm\:a,\:$ is the ubiquitous Vandermonde matrix,