I am having trouble with the algebra how do get from

y=(pay/w)^a * (pby/v)^b .... first I factor out y

y=(pa/w)^a * (pb/v)^b * y^(a+b) but how do I get to this result....

y=(pa/w)^a/(1-a-b) * (pb/v)^b/(1-a-b)

I know I could just assume the short cut...eliminate y and subtract each of its exponent variables from the denominator of the other variable exponents but I would really like to understand the long hand algebra... Thanks