When you are given a function and it asks you what f(a number) is then you plug in the number in the parentheses into everywhere you see x in the function equation.
Essentially this equation is saying that x is equal to 5
f(5)
f(x) = 3x + 2
f(x) = 3(5) + 2 ---> 15 + 2 ---> 17
so...
f(5) = 17
Hope this helped!