the assumption :
"...the only way is if they are arranged in the 3rd and 4th position ..."
is not quiet right.
Barring '5' we have '1', '2', '3', '4', '6', '7' and we need to select group of 5 out of these 6 models. Now Since '4' and '6' must be selected to violate the rule; so, we need to choose 3 out of 4 i.e. 3 models out of '1', '2', '3', '7'
which gives 4C3 = 4 ways.
So, the right combination which will violate the rule is:
(increasing order of height and where '4' and '6' are adjacent to each other)
1, 2, 3, 4, 6
1, 3, 4, 6, 7
1, 2, 4, 6, 7
2, 3, 4, 6, 7
i.e. only 4 groups will violate the rule.
now total number of ways of making 5 groups out of 7 people :
7C5 = 21
but out of these 21 groups 4 groups will not meet the requirement hence total number of groups which will follow the rule:
= 21 - 4
= 17