Your syntax is not quit right. Define the function like this:
f[x_] := 3 x - 2
then
f[5]
yields
13
Take a look at the references in this link so you can start to learn Mathematica
http://community.wolfram.com/groups/-/m/t/613588
Thank you!