2 solutions- x=13, y=11 & x=6, y=2
x^2+y-z=42,
x+y^2-z=18,
If we subtract equations side-by-side,
x^2-y^2-x-y=24 --> (x+y)(x-y-1)=24, 24 can be shown as multiplication of 24*1 or 12*2 or 8*3 or 6*4 if we are looking for positive integer solutions.
then we have systems for each pair:
1. x+y=24, x-y-1=1--> x=13, y=1
2. x+y=12, x-y-1=2--> no integer solution
3. x+y=8, x-y-1=3--> x=6, y=2
4. x+y=6, x-y-1=4--> no integer solution