Let $\prod_{i \in I} A_i / U \in P_U(K_1 \cup K_2)$, where $U$ is some ultrafilter over $I$. Consider the sets $J_1$ and $J_2$ you've defined. Take any $i \in I$, we have $A_i \in K_1$ or $A_i \in K_2$ since we are considering the ultraproduct of the members of $K_1 \cup K_2$. It means that $i \in J_1$ or $i \in J_2$, i.e. $I = J_1 \cup J_2$.
Now, since $U$ is an ultrafilter we have that $J_1 \in U$ or $J_2 \in U$. Let's assume that $J_1 \in U$. Since for $i \in J_1$ we have $A_i \in K_1$ the idea is to somehow construct an ultraproduct over $J_1$ (it will belong to the class $P_U(K_1)$) and to relate it to our initial ultraproduct. Let's do this!
Consider the following set $U_{J_1} = \{X \cap J_1 \mid X \in U\}$. You can check that $U_{J_1}$ is a filter over $J_1$ (here we are using $J_1 \in U$). I claim that $U_{J_1}$ is actually an ultrafilter over $J_1$. Suppose we have $A \subseteq J_1$ with $A \notin U_{J_1}$. Since $A = A \cap J_1 \notin U_{J_1}$ it must be the case that $A \notin U$ and hence we have $I \setminus A \in U$. But then (since $J_1 \subseteq I$) we have $J_1 \setminus A = (I \setminus A) \cap J_1 \in U_{J_1}$.
Now I claim that $\prod_{i \in I} A_i / U \cong
\prod_{j \in J_1} A_j / U_{J_1} \in P_U(K_1)$. Consider the following surjective homomorphisms:
- $\varphi$ and $\psi$ are natural projections onto the quotients
$$\varphi \colon \prod_{i \in I} A_i \to \prod_{i \in I} A_i / U, \quad
\psi \colon \prod_{j \in J_1} A_j \to \prod_{j \in J_1} A_j / U_{J_1}.$$
- $\pi$ is the restriction homomorphism ($f \mapsto f_{J_1}$)
$$\pi \colon \prod_{i \in I} A_i \to \prod_{j \in J_1} A_j.$$
The composition $\psi\pi$ is also surjective. By the homomorphism theorem we have
$$\prod_{i \in I} A_i / U \cong \prod_{i \in I} A_i / \mathrm{ker}\,\varphi, \quad \prod_{j \in J_1} A_j / U_{J_1} \cong \prod_{i \in I} A_i / \mathrm{ker}\,\psi\pi.$$
It is left to show that $\mathrm{ker}\,\varphi = \mathrm{ker}\,\psi\pi$. For any $f, g \in \prod_{i \in I} A_i$ we have the following chain of equivalences (using the definition of ultraproduct and $U_{J_1}$):
$$f (\mathrm{ker}\,\psi\pi) g \Leftrightarrow J_1 \cap \{i \in I \mid f(i) = g(i)\} = \{j \in J_1 \mid f_{J_1}(j) = g_{J_1}(j)\} \in U_{J_1}\\ \Leftrightarrow \{i \in I \mid f(i) = g(i)\} \in U \Leftrightarrow f(\mathrm{ker}\,\varphi)g.$$
Thus $\mathrm{ker}\,\varphi = \mathrm{ker}\,\psi\pi$ and
$$\prod_{i \in I} A_i / U \cong \prod_{i \in I} A_i / \mathrm{ker}\,\varphi = \prod_{i \in I} A_i / \mathrm{ker}\,\psi\pi \cong \prod_{j \in J_1} A_j / U_{J_1}.$$