the question identifies the variables for you, or most of them for that matter. start off by finding an equation which relates the two variables then find the formula for some quantity which needs to be maximised/minimised in terms of the two variables. now, you want the formula in terms of only a single variable and so throughout the relationship between the two variables you would have developed at the beginning, substitute one variable so that the formula is now in terms of a single variable. carry on to find the stationary pts of the quantity which is said to be maximised/minimised and then you should be able to answer.