Now, prime factorize 56 you get- 2^3 * 7 (you need to have at least 3 twos and one 7 in the numerator if you have anything lesser than this the answer will be a decimal.

Next thing to keep in mind is- n has to be the smallest number which has at least three 2’s.

Lets try different cases -

If you put n = 2 so 2! is = 2 (this has only one 2 so we have to cross this)

n = 3 so 3! = 6 (this has only one 2 so we have to cross this)

n = 4 so 4! = 24 (this has three 2’s right this is what we are looking for)
Now there is no point in going for a higher number because we have to take the smallest number that satisfies this.

The mistake that you are doing this is you are considering pn as a same number which is wrong p is a prime number and n is factorial so in your example we would write it as 7x3! and not 21! (they collectively dont make a factorial number. Read the question text carefully. The product of p and n doesn’t give you the factorial.
7x3! = 7x3x2x1 = 42 which is not divisible by 56.

unless you take n = 4 you won’t get a number that is divisible by 56 in this case because we want the smallest n. Anything lower than this doesn’t have three 2’s.