Question: 4(n-1)!+2=0(modn+2) , n is not 2&4 ?
In a general linear congruence, ax ≡ b (mod m), we will only have unique solutions when gcd(a,m) = 1.
Writing down your linear congruence as
4(n-1)! ≡ -2 (mod n+2) ≡ k(n+2) - 2 (mod n+2)
This will have unique solutions for gcd(a,m) = gcd(4(n-1)!, n+2) = 1.
Now, if m (i.e. n+2) is non-prime, then it will have at least two factors. Both factors will be > 1, and they will also both be less than (n-1).
Hence (n-1)! will have at least one factor common with m.
For gcd(a,m) = 1, then m must be prime.
The solution to your linear congruence: All those values of n such that n+2 is prime.
The first several primes are: 3, 5, 7, 11, 13, 17, 19, ...
Giving solution values for n as: 1, 3, 5, 9, 11, 15, 17, ...