'Consider' your function as a straight line

This is a straight line with a slope of and if it passes through the origin.

You're looking to find the maximum value for (subject to the constraints), so let increase and see what happens. How far can you slide the line before it leaves the shaded area ?