[tex]\begin{Bmatrix}x-y&=&3\\2x+y&=&12\end{matrix}[/tex]
Let's sum the second row with the first one
[tex]\begin{Bmatrix}x-y+2x+y&=&3+12\\2x+y&=&12\end{matrix}[/tex]
[tex]\begin{Bmatrix}3x&=&15\\2x+y&=&12\end{matrix}[/tex]
[tex]\begin{Bmatrix}x&=&5\\2x+y&=&12\end{matrix}[/tex]
replace the value of x
[tex]\begin{Bmatrix}x&=&5\\2*5+y&=&12\end{matrix}[/tex]
[tex]\begin{Bmatrix}x&=&5\\10+y&=&12\end{matrix}[/tex]
[tex]\begin{Bmatrix}x&=&5\\y&=&12-10\end{matrix}[/tex]
[tex]\boxed{\boxed{\begin{Bmatrix}x&=&5\\y&=&2\end{matrix}}}[/tex]