If we try to maximise/ minimise the function through calculus we get A as answer. BUT that is local maximum/minimum.
There are values of f(x) with given constraints that are greater/lesser that the local values. And as you move towards infinity you will get an ever increasing value of f(x).