I'm not aware of the rule you are referring to.
The rule of substitution?
For a general equality with free variable ,
means it is true for all values .
For convenience, since is a free variable, we can rename it to .
, now substitute for .
You can repeat this to show: