Differential amplifier common mode and differential mode gain
In order to null common-mode gain we want \$A_{v(CM)}=0\$

Recall inverting voltage gain is the ratio =-k and non-inverting gain is 1+k.  for R ratio k=R2/R1
We know \$A_{v(DM)}=\frac{R2}{R1}=\frac{R2'}{R1}\$
thus \$A_{v(CM)}= (\frac{R_2}{R_1}+1)(\frac{R_2'}{R_1'+R_2'})-(\frac{R_2}{R_1}) = 0   \$ for null CM gain
\$A_{v(CM)}=  ({\frac{R_2+R_1}{R_1}})({\frac{R_2'}{R_2'+R_1'}})-(\frac{R_2}{R_1}) = 0   \$
to balance input Z let \$R_1=R_1'=R, ~~~R_2=R_2' \$
to null bias current DC offset voltage.
If all parts have the same polarity of tolerance error, it cancels out. Now compute error for any one part with a tolerance error of ΔR/R (%) the resulting CM gain error is the same % for k=1 but 2x for large k due to ANY 1 part tolerance error.
(For practical reasons Laser trimmed R's inside IC's are better or R Arrays with 0.01% tolerance ratios.)  But even for perfect INA's with 120 dB CMRR, the imbalance of each wire in % causes CMRR error.
I'll let @jonk do the better math.