Thanks for the question! So in formal logic, it’s impossible to have P & ~P together. That’s kind of like saying 2+2=4, and 2+2 is not 4. Both of those statements can’t be true simultaneously, only one of them can be true. In general, a sentence and its negation cannot both be true, only one of them can be true. It can’t be raining and not raining at the same time, as another example.
As a result of this, if we have a sufficient premise that would lead to both a statement and its negation, that sufficient premise must be false. So here, we know X—>~Y and X—>Y. Well, let’s say X is true. Then Y is true, but also, ~Y is true! And that’s impossible. So that means X can’t be true; in other words, X is false (or X does not exist).
Hope this helps! Feel free to ask any other questions that you might have.