This belongs to a class of problems called "Linear Programming Problems(LPP)". See this
link for details on LPP.
The way to solve this problem is plot this on a cartesian plane. You get an area which satisfies all the given constraints. Since the constrains are linear, the area will be polygonal. Given these constraints, we want to optimise the given function f. If the area is bounded, f attains both maximum and minimum value at one of the vertices of the polygon obtained. Else, we cannot guarantee the existence of finite maximum or minimum value for f.
However, even if area is unbounded, we may have either maximum or minimum value for f.
I hope you can manage from here.