For a commutative ring $R$, an $R$-module $M$ and an ideal $I\trianglelefteq R$, I want to show that $\text{Hom}_R(I, \text{Hom}_R(I,M)) = \text{Hom}_R(I^2, M)$.
Is this true in general?
Suppose $I$ is generated by two elements $I = (x,y)$.
Then if $\eta : I^2 \rightarrow M$, then $\eta$ defines a map $\eta': I\rightarrow \text{Hom}(I,M)$ by sending $x\mapsto (x\mapsto \eta(x^2), y\mapsto \eta(xy))$ and similarly for $y$.
However if $\varepsilon : I\rightarrow \text{Hom}(I,M)$, I want to define $\varepsilon'$ by sending $x^2 \mapsto \varepsilon(x)(x)$, $xy\mapsto\varepsilon(x)(y)$ and $y^2 \mapsto \varepsilon(y)(y)$. This is an issue for $xy$, since I could also have defined it to send $xy \mapsto \varepsilon(y)(x)$, so there isn't a single choice for the map $\varepsilon'$.
I don't know how I could prove that $\varepsilon(y)(x) = \varepsilon(x)(y)$ in general. Am I approaching this problem incorrectly?