Your calculation is not easy to follow. You define the points x, y and z but not the points B, C and E. Are we to assume that these are the centres of the various circles ? If so you should say so. Similarly, (if I'm reading this correctly), you define p to be the length of a line and then later it somehow becomes a point.

Anyway, having said that, I think that your mistake comes at the point where you calculate an expression for EP. It looks as if you are assuming that the line Ey passes through the centre of the circle C, but that is not the case, in other words, it's the 4+r that's wrong.