f(5) means x = 5. So you need to find where the line is on the Y axis, when x is 5, y is equal to 2.
f^-1(2) is an inverse, which switches the x and Y so for this find Y= 2 and find the X value, which is X = 5.