Math Problem Statement

I drew both cases 1st one is if both odd or even and 2nd one is if one is odd and another is even and vice-versa. Is this correct representation according to solution?

Solution