Answer: \(n=40\).
Use
\({}^mC_r=\dfrac{m!}{r!(m-r)!}.\)
The equation is
\((n-4){}^{n+1}C_5={} ^{n+2}C_7.\)
Write each combination in factorial form:
\((n-4)\dfrac{(n+1)!}{5!(n-4)!}=\dfrac{(n+2)!}{7!(n-5)!}.\)
Since
\((n-4)!=(n-4)(n-5)!,\)
the factor \(n-4\) on the left cancels with the \((n-4)\) inside \((n-4)!\). Therefore the left-hand side becomes
\(\dfrac{(n+1)!}{5!(n-5)!}.\)
On the right-hand side, write
\((n+2)!=(n+2)(n+1)!\)
and
\(7!=7\cdot6\cdot5!=42\cdot5!.\)
So the right-hand side is
\(\dfrac{(n+2)(n+1)!}{42\cdot5!(n-5)!}.\)
Thus
\(\dfrac{(n+1)!}{5!(n-5)!}=\dfrac{(n+2)(n+1)!}{42\cdot5!(n-5)!}.\)
Cancel the common factor to get
\(1=\dfrac{n+2}{42}.\)
Therefore
\(n+2=42,\)
so
\(n=40.\)