# Manipulating logarithms solving probability problem

I have this equation $$(1-P_x) = (1-P_y)^{127} + 127P_y(1-P_y)^{126}$$

now I have $P_y=0.125*10^{-3}$
I've tried to solve $P_x$ using logarithms but I'm doing something wrong since $P_x$ cames out negative $$log(1-P_x) = 127log(1-P_y)[log(127)+log(P_y)+126log(1-P_y)]$$ then i calculate $10^{log(1-P_x)}$ and i find $P_x$ but it's negative!

When you've taken logs initially, you appear to have used the 'fact' that $$\log(a+b)=\log(a)\log(b)$$ Unfortunately this is not true e.g. take $a=b=1$.