If I have the following system of equations:
$2+x^2-y^2=0$
$x^2-y^2-2=0$
And if I substitute $y$ by a function of $x$ and vice versa I get:
$2+x^2-x^2+2=0$
$y^2-y^2-4=0$
I therefore get:
$4=0, -4=0$ Therefore I don't have any solutions for that system of equations
In theory, am I allowed to get to this conclusion?
This is a typical Reductio ad absurdum. As long as you don't violate the Zermelo–Fraenkel set theory and the properties of the objects you're using, there's no reason for your reasoning to be incorrect.