As the given matrices A and B are equal, therefore, their corresponding elements must be equal. Comparing the corresponding elements, we get
2x + 1 = x + 3 2y = y2 + 2
0 = 0 y2 − 5y = −6
On simplifying, we get
x = 2, but there is no common value of y for which A and B are equal.
Hence, A and B cannot be equal for any value of y.