Let $X=\mathbb{R^2}$ and let
$$A=\{(0,0)\}\cup\{(x,y):x>0\}\subseteq X\;.$$
Notice that there is no compact set around $\{(0,0)\}$ because it will be open set. It looks like work for example of two locally compact space whose union are not locally compact. Is it true?
\{\}– user251257 Aug 14 '16 at 14:48