$$ x , y $$ and $$ 40 $$ are the measure of interior angles of a triangle
$$ \therefore x +y + 40^0 =180^0 $$
$$ \Rightarrow x +y= 140^0 .....(i) $$
The difference between $$ x $$ and $$ y $$ is $$ 30^0 $$ so
$$ x - y = 30^0 ...(ii) $$
$$ x + y = 140^0 [from (i) ] $$
______________________
$$ 2x = 170^0 $$ [ adding $$ (i) $$ and $$ (II) $$]
$$ \Rightarrow x = \frac {170}{2} = 85^0 $$
Now $$ x +y =140^0 $$ [ from (i) ]
$$ \Rightarrow 85^0 + y = 140^0 [ rs x = 85^0 $$]
$$ \Rightarrow y = 140^0 - 85^0 $$
$$ \Rightarrow y = 55^0 $$
and $$ x = 85^0 $$