I would treat it as a linear inhomogeneous difference equation to get the closed form for \(\displaystyle f(x)\).
Expanding on MarkFL's suggestion, \(\displaystyle f(x) = f(x-1) + 5x, \; f(1)=2\) yields the recursively defined sequence:
\(\displaystyle a_n = a_{n-1} + 5n \) whose first term is \(\displaystyle a_1 = 2 \). Note that \(\displaystyle f(n) = a_n\) when \(\displaystyle n\) is a natural number.
With the goal of finding a closed form formula for \(\displaystyle a_n\) in mind, the first few terms are:
\(\displaystyle a_1 = 2\)
\(\displaystyle a_2 = a_1 + 5 \cdot 2\)
\(\displaystyle a_3 = a_2 + 5 \cdot 3 = (a_1 + 5 \cdot 2) + 5 \cdot 3 = a_1 + 5(2 +3)\)
\(\displaystyle a_4 = a_3 + 5 \cdot 4 = (a_1 + 5(2 +3)) + 5 \cdot 4 = a_1 + 5(2+3+4)\)
By inspection, a formula (whose validity can be proved by an induction argument) for \(\displaystyle a_n\) in terms of \(\displaystyle a_1\) and \(\displaystyle n\) is:
\(\displaystyle a_n = a_1 + 5(2 + 3 + \cdots + n)\)
A closed form formula for \(\displaystyle a_n\) can be derived from the identity \(\displaystyle 1+2+\cdots+n=\frac{n(n+1)}2\) and the fact that \(\displaystyle a_1 = 2\).