Homomorph-containment is not transitive

Statement with symbols
It is possible to have groups $$H \le K \le G$$ such that $$H$$ is a homomorph-containing subgroup of $$K$$ and $$K$$ is a homomorph-containing subgroup of $$G$$, but $$H$$ is not a homomorph-containing subgroup of $$G$$.

Related facts

 * Subhomomorph-containment is transitive: Subhomomorph-containment is a stronger subgroup property that is transitive.
 * Subhomomorph-containing implies right-transitively homomorph-containing: A homomorph-containing subgroup of a subhomomorph-containing subgroup is homomorph-containing.
 * Full invariance is transitive: The property of being a fully invariant subgroup is a weaker subgroup property that is transitive.

An example
Consider the group:

$$G = SL(2,5) \times \mathbb{Z}/2\mathbb{Z}$$.

Let $$K$$ be the first direct factor $$SL(2,5)$$ and $$H$$ be the center of $$K$$, which is a cyclic subgroup of order two in $$K$$. Then:


 * $$K$$ is homomorph-containing in $$G$$: For any homomorphism from $$K$$ to $$G$$ the projection to the second direct factor is trivial since $$K$$ is a perfect group and therefore has no quotient of order two. Thus, any homomorphism from $$K$$ to $$G$$ has image in $$K$$.
 * $$H$$ is homomorph-containing in $$K$$: In fact, the only element of order two in $$K$$ is the non-identity element of $$H$$.
 * $$H$$ is not homomorph-containing in $$G$$: There is a a homomorphism from $$H$$ to $$G$$ mapping $$H$$ isomorphically to the second direct factor.