Hint $\ $ Intuitively the induction step arises by applying the Congruence Product Rule
$$ \begin{align}{\rm mod}\,\ 7\!:\qquad \color{#0a0}{12}\ \equiv&\,\ \color{#c00} 5\\ 12^n\equiv&\,\ 5^{n-1}(-2)\qquad\ {\rm i.e.}\ \ P(n)\\\overset{\rm multiply}\Rightarrow\ \ \color{#0a0}{12}\cdot 12^n\equiv&\,\ \color{#c00}5\cdot 5^{n-1}(-2)\quad {\rm i.e.}\ \ P(n\!+\!1)\end{align}\ \qquad $$
Remark $\ $ If we eliminate the language of congruences by substituting inline the linked proof of the Congruence Product Rule then we obtain precisely the common proof in most other answers. I wrote the congruence proof in this form (vs. the more common way) to highlight this relationship.
Thus the inductive step need not be pulled out of a hat like magic. Rather, it has very intuitive arithmetical content as congruence multiplication. See also this answer where I elaborate on this viewpoint (it shows in gory detail precisely how the inductive proof is equivalent to eliminating congruence language by substituting inline the proof of the Congruence Product Rule).
If we exploit to the hilt the congruence viewpoint then applying CPR we can substitute $\, -2\equiv 5\,$ reducing the proof to $\,12\equiv 5\,\Rightarrow\, 12^n\equiv 5^n,\,$ a special case of the Congruence power Rule. This is a prototypical example of the great simplification afforded by the use of congruences in induction problems of this arithmetical type. Often they allow one to reduce the induction to a trivial induction,, e.g. $\,(-1)^{2n}\equiv 1\,$ or $\,1^n\equiv 1,\,$ e.g. the above as $\,12^n/5^n\equiv (12/5)^n\equiv 1^n \equiv 1.$
Generally, unlike above, there is no need to massage the congruence proof into some form to highlight its relationship with another proof. In that case we can simply apply the congruence rules (laws) in whatever manner proves convenient (this is what was done in the linked common congruence proof, where no explicit mention was made when invoking both the congruence laws and the trivial induction conveniently encapsulated in the power law $\,12\equiv 5\,\Rightarrow\,12^n\equiv 5^n).$