How to eliminate ambiguity of the follwing CFG?
Basically you have $L = L_1 \cup L_2$ where $L_1 \cap L_2 \ne \emptyset$. So naively writing the two productions:

$$L \to L_1 \\
L \to L_2
$$
will create an ambiguity. What's needed is to create $Ḷ_1' = L_1 - L_2$ in order to use the CFG
$$L \to L_1' \\
L \to L_2
$$
This produces the same language, resolving the ambiguities in favour of $L_2$. 

Context-free languages are not closed under set difference, so this is not a general solution. But in this particular case there is no problem.

Suppose we start with the two languages $L_1 = \{ a^ib^jc^kd^i \}$ and $L_2 = \{ a^ib^jc^jd^k \}$, which are not disjoint since $\{a^ib^jc^jd^i\}$ is a subset of both.

So we define 
$$Ḷ_1' = L_1 - L_2 = \{ a^ib^jc^kd^i \mid j \ne k\}$$
and are pleased to observe that it is context-free:

$$\begin{align}L_1' &amp;\to E \mid a \; L_1'\; d\\
E &amp;\to B \mid C \mid b \; E \;c\\
B &amp;\to b \mid B b \\
C &amp;\to c \mid C c
\end{align}$$

Meanwhile, $L_2$ is simply

$$\begin{align}L_2 &amp;\to A\; F\; D \\
F &amp;\to \lambda \mid b\;F\;c \\
A &amp;\to \lambda \mid A a \\
D &amp;\to \lambda \mid D d
\end{align}$$