Answer $A$
Check if $12-x$ is maximum.
$\Rightarrow 12-x > 8 - y$
but $ y = 10 - x$ $\because x + y = 10\;\text{ (Given)}$
$\Rightarrow 12 - x > 8-(10-x)$
$\Rightarrow x < 7$
Now,
$g(x,\ y) = 12-x,\ \text {if }\ x < 7$
Now, the minimum value of $12-x$ is when $x$ has maximum value that is $7$
$\Rightarrow min(g(x,\;y)) = 12 - 7=5 \;\text{if} \;x < 7$
the minimum of $x-2$ is when x has minimum value $i.e.$ 7
$\Rightarrow min(g(x,\;y)) = 7-2 = 5 \;\text{if} \;x > 7$
$\therefore$ Answer$= 5$
$\therefore A$ is the correct answer.