The Fundamental Counting Principle is used in determining all the possible outcomes and the total possible ways different events can be combined with each other. It is usually done by multiplying all the events together to get the total possible outcome. Doing this also helps in determining the sample space of a probability.
For example there are events a, b and c. The total sample space or possible outcome will be a*b*c.
G is shifted 2 to the left and one up. 2 to the left is represented by changing the input by adding 2 to it (as the original is 2 more than the edited), and adding 1 to the end of it adds 1, so our answer is (x+2)^2+1