Let $X$ be a locally compact metric space, and let $A,B$ be disjoint closed subsets of $X$. Can I find disjointly supported functions $f,g\in C_0(X)$ such that $f(A)=1$ and $g(B)=1$ and with at least one of $f,g$ compactly supported?
The part about compact support is what I am not sure about.
The following is what I am really trying to do: Given $f',g'$ bounded measurable functions on $X$ with disjoint support, I am trying to find $f,g\in C_0(X)$ with disjoint supports and with at least one of them compactly supported such that $ff'=f'$ and $gg'=g$.
Let $X$ be any normal space and $A, B$ be disjoint closed sets. There exist open neighborhoods $U, V$ of $A, B$ such that $cl(U) \cap cl(V) = \emptyset$. By Urysohn's lemma you can find continuous functions $f, g : X \to [0,1]$ such that $f(x) = 1$ for $x \in A$, $f(x) = 0$ for $x \in X \setminus V$ and $g(x) = 1$ for $x \in B$, $g(x) = 0$ for $x \in X \setminus U$. Then $supp(f) \subset cl(U), supp(g) \subset cl(V)$, i.e. $f,g$ are disjointly supported.
If you want at least one of $f, g$ compactly supported, then you obviously need the requirement that at least one of $A, B$ is compact (because at least one of $A,B$ is a closed subset of compact set).
If $X$ is locally compact, then this also sufficient. This is true because each open neighborhood $U$ of a compact $A$ admits an open neighborhood $U'$ such that $cl(U')$ is compact and $cl(U') \subset U$.