Without giving too much away, I think it might be beneficial if you set the two constraint curves equal to each other. If you do that, you can find the points that they intersect at and plug them back into $f$. Compare that function value to some other extrema that you found.