Let number of small bags = s
Let number of medium bags = m
Given profit on 1 small bag = $1
then profit on s bags = 1s
Given profit on 1 medium bag = $2
then profit on m bags = 2m
Now total profit from both type of bags is 1x+2y
profit should be more than $100 so we get inequality
1s+2m>100
Total number of bags are fewer than 100 so we get
s+m<100
which are same as inequalities you found.
Hence your answer is correct.