This observation is sometimes referred to as the "Structure of One Endomorphism".
Let $V$ denote the $n$-dimensional column vector space over a field $\mathbb{F}$.
Given a square $n\times n$ matrix $A$ over $\mathbb{F}$ we consider $V$ as a module over $\mathbb{F}[\lambda]$ by letting $\lambda$ act as $A$ and denote it as $V_A$.
Note that $V_B$ is isomorphic as a module to $V_A$ if and only if there is a choice of $\mathbb{F}$-basis for $V=V_B$ under which the action of $\lambda$ on $V_B$ is given by multiplication by $A$. In other words,
$A$ and $B$ are similar if and only if $V_A$ and $V_B$ are isomorphic as modules over $\mathbb{F}[\lambda]$
One then observes that we have a natural surjection $\mathbb{F}[\lambda]\otimes V\to V_A$ given by $\lambda\otimes v\mapsto Av$ and $1\otimes v\mapsto v$. The kernel of this is generated by expressions of the form $\lambda \otimes v - 1\otimes Av$. In other words, we have an exact sequence
$$
0 \to
\mathbb{F}[\lambda]\otimes V
\stackrel{\lambda I - A}{\longrightarrow}
\mathbb{F}[\lambda]\otimes V
\to V_A \to 0
$$ Any change of $\mathbb{F}[\lambda]$-basis for the two free modules in this sequence corresponds to replacing $\lambda I - A$ by $S(\lambda I - A)T$ where $S$ and $T$ are $n\times n$ invertible matrices over $\mathbb{F}[\lambda]$.
The isomorphism of $V_A$ with $V_B$ "lifts" to such an isomorphism by the usual lifting property for free resolutions.
An explicit such isomorphism can be found as a consequence of the Smith Normal Form (SNF) known at least to Henry John Stephen Smith but perhaps to others as well in various forms.