x denotes the number of times he can take unit step and y denotes the number of times he can take 2 steps, then x+2y=7,
Then x can be x=1,3,5,7
If x=1, the steps will be 1 2 2 2
⇒ number of ways =4!3!=4
If x=3, the steps will be 1 1 1 2 2
⇒ number of ways =5!2!.3!=10
If x=5, the steps will be 1 1 1 1 1 2
⇒ number of ways =6!5!=6
If x=7, the steps will be 1 1 1 1 1 1 1
⇒ number of ways =7!7!=1
Hence total number of ways =4+10+6+1=21