Given $\begin{bmatrix}x+y & 2\\5+z & xy\end{bmatrix}=\begin{bmatrix}6 & 2\\5 & 8\end{bmatrix}.$ Since these matrices are equal, we can an obtain the value of x,y,z by comparing the matrices' corresponding elements.
By comparing the given two matrices of equal order, we can see that:
$x+y = 6$ (i)
$5+z = 5$ (ii)
$xy = 8$ (iii)
From (i) we get $x = 6-y$. Substituting in (iii), we get $(6-y)y = 8$ $\rightarrow$ $y^2-6y-8=0$.
Solving for $y$, $(y-2)(y-4) = 0 $ $\rightarrow$ $y=2$ or $y=4$.
Given than $xy=8$, If $y=2$, then $x=4$ and if $y=4$, then $x=2$.
Solving (ii), we get $5+z = 5$. $\rightarrow$ $z = 0$.
Solving for x, y and z we get two solutions $(x,y,z) = (2,4,0)$ or $(4,2,0)$.