Step1:
Given
$\begin{bmatrix}xy & 4\\z+6 & x+y\end{bmatrix}=\begin{bmatrix}8 & w \\ 0 & 6\end{bmatrix}$
Since the given matrices are equal hence their corresponding elements should be equal.
$\Rightarrow$ xy=8--------(1)
$\quad$ 4=w-------(2)
$\quad$ z+6=0-------(3)
$\quad$ x+y=6------(4)
Step2:
From equation (2) we have w=4.
From equation (3) we have
z+6=0.
z=-6
Step3:
From equation (1) we have,
xy=8
$x=\frac{8}{y}$----(5)
Substitute the value of x in equation (4)
x+y=6
8/y+y=6
$\frac{8+y^2}{y}=6$
$8+y^2=6y$
$y^2-6y+8=0$
$y^2-4y-2y+8=0$
y(y-4)-2(y-4)=0
(y-2)(y-4)=0
y=2,4
$\Rightarrow $y=2 or 4.
Step4:
Substitute the value of y in equation (5)
x=$\frac{8}{y}$
x=8/2 or 8/4.
$\;\;$=4 or 2.
x=4 or 2.