The other answers seem right, so I will just pedant the point a little bit :)
Can you assume that the solution of P is a single point? If not (for example, A=B=C=D=0.5), your solution might be a line. Your calculation may fail with a divide by zero.
Can you assume that the lines definitely do cross? If they don't, at best you will get an answer of (x>1). At worst, they will be parallel lines and you'll get some lovely division by zero error (depending how you calculate the answer).
Can you assume that both lines intersect the same two sides? If not, y=mx+c based calculations will fall apart somewhat with vertical lines, but then I don't think any of the answers given here will hold anyway.