What happens if one multiplies two elements belonging to two different groups? What happens if one multiplies two elements belonging to two different groups? Where does the result lie? Let's say that $a \in \mathbb{Z/pZ}$ and $b \in \mathbb{Z/p^2Z}$, then where does $a \cdot b$ belong?
 A: 
Motto: One cannot add apples and oranges, except if one considers them all as fruits.

In other words, given two groups $(G,\ast)$ and $(H,\circ)$, there is no way to compose $g$ in $G$ and $h$ in $H$ in general. To begin with, should we consider $g\ast h$ or $g\circ h$? Neither, since $g\ast h$ is not defined if $h$ is not in $G$ and $g\circ h$ is not defined if $g$ is not in $H$.
On the other hand, if there exists a third group $(K,\cdot)$ containing $(G,\ast)$ and $(H,\circ)$ as subgroups, then $g\cdot h$ makes sense as an element of $K$.
This requires to specify $(K,\cdot)$ since $(G,\ast)$ and $(H,\circ)$ could also be subgroups of another group $(L,\odot)$ and one would need to know whether $g$ and $h$ are composed using the composition law $\cdot$ of $K$ or the composition law $\odot$ of $L$.
Such a group $(K,\cdot)$ always exists, an example being the product group defined by $K=G\times H$ and the composition law $(g,h)\cdot(g',h')=(g\ast g',h\circ h')$. Then $K$ contains $G$ and $H$ in the sense that there exist canonical injective morphisms $a:G\to K$ and $b:H\to K$, for example, $a:g\mapsto(g,e_H)$ and $b:h\mapsto(e_G,h)$. Then, the composition of $g$ in $G$ and $h$ in $H$ is $a(g)\cdot b(h)$, which, in our example, is simply the pair $(g,h)$.
If one reads the groups in the example of the question as being the additive groups $(G,\ast)=(\mathbb Z/p\mathbb Z,+)$ and $(H,\circ)=(\mathbb Z/p^2\mathbb Z,+)$, still another construction can be used. Consider $(K,\cdot)=(\mathbb Z/p^2\mathbb Z,+)$ and the morphisms $a:\mathbb Z/p\mathbb Z\to\mathbb Z/p^2\mathbb Z$, $i\mapsto pi$, and $b:\mathbb Z/p^2\mathbb Z\to\mathbb Z/p^2\mathbb Z$, $j\mapsto j$. Then the composition law in $\mathbb Z/p^2\mathbb Z$ of some $i$ in $\mathbb Z/p\mathbb Z$ and some $j$ in $\mathbb Z/p^2\mathbb Z$ produces 
$$
a(i)+b(j)=pi+j,
$$ 
in $\mathbb Z/p^2\mathbb Z$. This represents the first group $(G,\ast)=(\mathbb Z/p\mathbb Z,+)$ as a subgroup of the second group $(H,\circ)=(\mathbb Z/p^2\mathbb Z,+)$ and uses the composition law of $H$.
