I did not under stanf the relation

f(n)=nf(n-1)+nc2f(n-2)
y this is not the ans ?

Can u please elaborate why u think this can be the answer.

i was relating this que to n steps problen when u can eihter take 1 or 2 steps at at time…but at that time steps are considered to be identical but person cannot be treated that way. so it should be choosing a person from n persons and if paring then 2 persons from n,that’s y.
f(n)=n f(n-1)+nc2 f(n-2)