I would like some hint for the following exercise:
Suppose $Q$ is an injective $\mathbb Z$ right module. Let $R$ be a ring. Recall that $\text{Hom}_{\mathbb Z}(R, Q)$ has a $R$-right module structure given by $(fr)(x)=f(rx)$. Show that $\text{Hom}_{\mathbb Z}(R, Q)$ is an injective $R$-module.
I tried to use Baer's criterion but it didn't work.
Let's use criterion 3 from https://en.wikipedia.org/wiki/Injective_module, and I will use all the notation from the wikipedia article. So let $f: X \to Y$ be an injective $\mathbb{Z}$ module homomorphism, and $g: X \to Hom(R,Q)$ an arbitrary homomorphism. Denote $g(x)=\phi_x$, so we get a map $\tilde{g}: X \to Q$ given by $x \to \phi_x(1)$. So we have a $\tilde{h}: Y \to Q$. Then $h(y)=\phi_y \in Hom(R,Q)$ may be defined as $\phi_y(r)=\tilde{h}(ry)$. Then $h(f(x))(r)= \tilde{h}(f(x)(r))= \tilde{g}(xr)$ by the injectivity of $Q$. By the criterion 3 in the wikipedia article, this is merely $g(xr)(1)$.