Find homology $S^n-f(X)$ where f is injective 
Let $f\colon X\to S^n$ be an injective function. Find the homology groups of $S^n-f(X)$ where:
a. $X=S^k\sqcup S^r$
b. $X=S^k\vee S^r$

The question above gives hint to look in both cases at $U=S^n-f(S^r),V=S^n-f(S^k)$. Nevertheless, the calculation became quite complicated in the first case.
On the second case, since $f$ is injective, $$S^n-f(X)=(S^n-f(S^r))\vee(S^n-f(S^k))$$
hence, $$H_i(S^n-f(X))=H_i(S^n-f(S^r))\oplus H_i((S^n-f(S^k))=\begin{cases}\mathbb{Z}& i=n-k-1,n-r-1\quad(k\neq r)\\ \mathbb{Z\oplus Z}& i=n-k-1=n-r-1 \\ 0& \mbox{otherwise} \end{cases}.$$Is that correct?
EDIT: Now I got stuck with the calculation in the second case. It appears that $U\cap V=S^n-f(X)$ and $U\cup V=S^n-f(S^{\min\{k,r\}})$ which turns the calculation to a very complicated one (I totally messed up with the indices). Am I right about the second part? should the intersection be something else?
 A: I don't want to do the entire question for you because I think it's an instructive exercise which is worth putting in the effort in order to build your intuition for similar questions. What I'll do is a calculation for a special case. Let $n=3$, $k,r=1$. I'll do part b. (which is actually the easier case) our space is $Y_b=S^3 - (S^1\vee S^1)$.
b. To make things easier to follow, let $S^1_U$ be the image of the first circle under $f$, and let $S^1_V$ be the image of the second circle under $f$. We note that $U = S^3 - S^1_U$ and $V = S^3 - S^1_V$.
As $f$ is injective, $S^1_U\cap S^1_V = f(*)$ where $*$ is the point that $S^1$ is wedged with $S^1$, and $S^1_U \cup S^1_V = S^1_U\vee S^1_V$ and so $$U\cup V = (S^3 - S^1_U) \cup (S^3 - S^1_V) \\ = S^3 - (S^1_U\cap S^1_V) = S^3 - f(*) \cong \mathbb{R}^3$$
and
$$U\cap V = (S^3 - S^1_U) \cap (S^3 - S^1_V) \\ = S^3 - (S^1_U\vee S^1_V) = Y_a $$
We can put this into the (reduced) Mayer Vietoris sequence then, to get the exact sequence
$$\cdots \to \tilde{H}_4(\mathbb{R}^3)\to \tilde{H}_3(Y_a) \to \tilde{H}_3(U)\oplus \tilde{H}_3(V) \to \tilde{H}_3(\mathbb{R}^3) \to \cdots \to \tilde{H}_0(\mathbb{R}^3)$$
Recall that $\mathbb{R}^3$ is contractible, so $\tilde{H}_n(\mathbb{R}^3)=0$ for all $n$, so the sequence splits into  short exact sequences of the form $$0\to \tilde{H}_n(Y_a) \to \tilde{H}_n(U)\oplus \tilde{H}_n(V) \to 0$$ hence $\tilde{H}_n(Y_a) \cong \tilde{H}_n(U)\oplus \tilde{H}_n(V)$. From here, you have to work out the homology of $S^3$ with a circle removed, which I'll leave to you.
Part a. is similar except the sequence won't split into nice short exact sequences in every degree any more (but will in most) because you'll have $U\cup V=S^3$ instead of $\mathbb{R}^3$.
