When consumer consumes two commodities and prices are not equal, then equilibrium is achieved when consumer equates the ratio of marginal utility derived from one commodity in comparison to it's price with the ratio of the marginal utility of another commodity in comparison to it's price.These two ratios should be equal to the marginal utility of money as given.
MUX=MUY=MUM