You have the following function:
f(x) = (x + 1)²
In order to determine the value of f(2) you replace the value x = 2 in the given function and make the operations, just as follow:
f(2) = (2 + 1)² simplify inside parenthesis
f(2) = (3)² 3² is the same as 3x3=9
f(2) = 9
Hence, the value of the function when x = 2 is f(2) = 9