My best guess is that you don't fully understand the notation. That kind of function is called a piecewise function. Let's break it into pieces.
Here's the first line:
2x, x < 1
All this means is that the equation is equivalent to 2x when x is less than 1. Remembering that x is the input this means f(-2) is -4 because 2 * -2 is -4.
The next line is
5, x = 1
This means that when x is equal to 1, the equation is equivalent to 5, meaning f(1) = 5.
This pattern continues for however many lines in the function. If you graph one of these functions you may notice that the line is broken up into pieces. This is because from the left the graph will look like 2x which would be 2 at x = 1. However the piecewise function defined f(1) as 5, meaning it would jump at that one point. Then continuing after one it would start at 4 because the last piece says that when x is bigger than one the equation acts as x^2.