Solution :

$$\eqalign{
& \frac{{0 + x}}{2} = 1\,\,;\,\,\frac{{0 + y}}{2} = 2 \cr
& x = 2\,\,;\,\,y = 4 \cr} $$
Equation of line passing through $$\left( {2,\,0} \right)$$ and $$\left( {0,\,4} \right)$$
$$\eqalign{
& y - 0 = \frac{{4 - 0}}{{0 - 2}}\left( {x - 2} \right) \cr
& {\text{or }}y = - 2x + 4 \cr
& {\text{or }}2x + y = 4 \cr} $$