Strange problem...
Constraints are Y <= 40 bags and X=Y in quantity. Nothing else matters. That's a bad decision unless the chicken farmer lost a poker hand to store X.
We have already chosen "i" to be the first letter. This means that we still have 8 letters that we can use as the second letter. Once that letter is chosen, we still have 7 letters that we can use as the third letter, and so on. This means we have

ways of choosing the remaining 8 letters.
<u>However,</u> some of the 8 available letters are equal: we have 2 m's, 2 t's and 2 e's. This means that we overcounted the number of words on the reasoning above. We can correct the counting by dividing three times by 2!, one time for each of the repeated letters.
The final answer is

Sorry but there is no question
Using the formula a^2+b^2=c^2you can fill in the numbers so that a=height of mattress in inches,b=40 inches or distance from base of the bed and c=48 or length of the ramp. a^2+40^2=48^2a^2+1600=2304
So then it becomes2304-1600=a^2704=a^2 26.5+=aSo, The top of the mattress(after rounding) is 26.5 inches off the ground.