consumer utility

Suppose a utility function is given by $U(x,y)= \max \{x,y\} + \min \{x,y\}$ $x$ and $y$ are $2$ commodities with prices $1$ and $2$ respectively and consumer's budget is Rs. $150$.

What will be the optimal values of commodities consumed?

-
Hint: If you have two numbers, one is always equal to the minimum and the other equal to the maximum, even when they are equal. So the sum of the minimum and the maximum is simply the sum of both numbers: $u(x,y)=x+y$.
@BrianM.Scott: just so that the order in which I wrote $x$ and $y$ resemble the order of the maximum and the minimum in the utility function. It holds of course in general. –  Michael Greinecker May 23 '12 at 8:48
@sahil: If you write down an equation representing the constraint, you’ll have a relationship between $x$ and $y$. This will allow you to express the utility of the pair as a function of just one of them. –  Brian M. Scott May 23 '12 at 8:57