The first thing you must remember is that the product of matrices is done by multiplying rows by columns.
For this case, the AB matrix is
AB = [1 0 0; 0 1 0; (x + 1) 0 y]
Equalizing the identity matrix we have
AB = I
[1 0 0; 0 1 0; (x + 1) 0 y] = [1 0 0; 0 1 0; 0 0 1]
Therefore we have
x + 1 = 0
y = 1
The values of x and y are
x = -1
y = 1
the answer is
X=-1
Y=1