That's a great problem. What are your plans for solving it?

Set up some coordinate axes.

Write the equations of your constraints.

Graph them on your axes.

Think about your minimization formula. Just pick a few values and graph the resulting lines. See if it soaks in.