I want find the primary decomposition of $I=P_1P_2=P_1\cap P_2\cap m^2$ in $k[x,y,z]$, where $P_1=\langle x, y \rangle, P_2=\langle x,z\rangle , m=\langle x,y,z\rangle$. I am unsatisfied with my current attempt and would like to get some clues to write better.
Thank you!
Note that $ \dfrac {k [x, y, z]} {P_1} \simeq k [z] $ is a domain. So $ P_1 $ is prime. Similarly, $ P_2 $ is prime. Now, see that $ \dfrac {k [x, y, z]}{m} \simeq k $ is a field, where $ m $ is maximal.
Let be $ I = P_1P_2 $. A $ p \in I $ element is of the form $ p_1p_2 $, where $ p_1 \in P_1 \subset m $ and $ p_2 \in P_2 \subset m $. So $ I \subset P_1 \cap P_2 \cap m ^ 2 $. On the other hand, if $ p \in P_1 \cap P_2 \cap m ^ 2 $, then $ p $ is of the form $ qp (x) $, with $ q \in k [x, y, z] $. We have $ p (x) \in P_2 $. If $ q \not \in P_1 $, then $ q \in P_2 $ (and $ qp (x) = p (x) q \in I = P_1P_2 $) or $ q $ has a nonzero constant term (and $ p (x) \in m ^ 2 $, where $ p (x) = p_1 (x) p_2 (x) \in I = P_1P_2 $). Thus, $ I \supset P_1 \cap P_2 \cap m ^ 2 $.
This decomposition is obviously primary. We prove it is reduced. Initially, $ \sqrt {P_1} = P_1, \sqrt {P_2} = P_2, \sqrt {m ^ 2} = m $ are all distinct. On the other hand, $ x \in P_1 \cap P_2 $ and $ x \not \in m ^ 2 $, while $ y^ 2 \in P_1 \cap m ^ 2 $ and $ y ^ 2 \not \in P_2 $. Finally, $ z ^ 2 \in P_2 \cap m ^ 2 $ and $ z ^ 2 \not \in P_1 $. This guarantees the second part of the definition.
The $ m ^ 2 $ component is layered as $ P_1 \cup P_2 \subset \sqrt {m ^ 2} = m $. The others are isolated.
This part of the argument makes no sense to me. If $p(x) = qp(x)$ then $q = 1$. It looks like you're assuming that elements of $P_1 \cap P_2 \cap m ^ 2$ must factor as a product of two non-constant polynomials but on what basis are you making this factorization? Elements of $P_1$ don't necessarily factor, nor $P_2$, nor even $m^2$ (example: $x^2 + y^2 + z^2$).
I would think about it this way: these are all monomial ideals so however you combine them (product, intersection) should also be generated by monomials. This is worth reading about (e.g. https://www.ndsu.edu/pubweb/~ssatherw/DOCS/monomial.pdf, Theorem 2.1.1 about intersections of monomial ideals).
For example, $P_1P_2 = ⟨x,y⟩⟨x,z⟩ = ⟨x^2,xy,xz,yz⟩$ (more-or-less by definition) and $P_1 \cap P_2 = ⟨x,xy,xz,yz⟩$ (which is not too difficult to prove, I hope). You can easily show that $P_1 \cap P_2 \cap m^2$ contains $x^2, xy, xz, yz$ so it contains $I$. Your argument is just as fine.
Next, you can show that $P_1 \cap P_2 = ⟨x,xy,xz,yz⟩$ and $⟨x,xy,xz,yz⟩ \cap m^2 = ⟨x^2,xy,xz,yz⟩$.