You simply have to substitute #x# or #y# from the first equation to #x# or #y# in the second equation.
So in the first equation, the value of #y# is #x-5#. You just have to substitute this value into #y# in the second equation.
#[1]color(white)(XX)y=2x#
#[2]color(white)(XX)x-5=2x#
#[3]color(white)(XX)-5=2x-x#
#[4]color(white)(XX)color(blue)(x=-5)#
Now that we have the value of #x#, we can plug it into either of the two equations to solve for #y#.
#[1]color(white)(XX)y=x-5#
#[2]color(white)(XX)y=(-5)-5#
#[3]color(white)(XX)color(red)(y=-10)#