What you want to do is graph each of the linear inequalities and find points of intersection. When you graph them, you find points of (0,0), (0,6), and (6,2). You take each of these points and plug them in to the profit function 5x+7y to find out which point(s) will give you the maximum.

When you plug in the values, you find that both (0,6) and (6,2) give you a profit of 42, so either one of those would maximize your profit.

You can see the graph and the work in the picture below.