It is true because there exists a nonsingular linear transformation
where X is a matrix of the first quadratic form x2+y2+z2 ,
and
Y is a matrix of the second quadratic form x2-y2-z2
and B is a matrix of the nonsingular linear transformation and