An=-2+5(n-1)
to convert this to function notation we need to simplify the expression and the equalize the expression simplifyed to f(n)

in the middle step we applied the distributive law for the multiplication, and the we operate the independent terms
then
f(n)=5n-7