A function f:X\to Yf:X→Y is given when you have two sets, and a law which tells you how to associate one, and only one item y \in Yy∈Y to each x \in Xx∈X.
The simplest case is represented by numeric function, which means that you associate a real number to every real number. So yes, x^2+5x2+5 is a function, because for every real number you can calculate its square, and then add five. This is exactly what the "law" I mentioned before tells you to do: writing f(x)=x^2+5f(x)=x2+5 (or also often y=x^2+5y=x2+5) means "take a number xx, multiply it by itself, obtaining x^2x2, and then add 55 to the result, obtaining x^2+5x2+5.