Answer:
Ryan is 23 and Naomi is 17.
Explanation:
Find the midpoint of 40. This is 40/2, or 20.
Because the difference in age is 6, but the total of the ages must add up to 40, you must also halve 6. 6/2 is 3.
Take away three and add three to 20.
20 + 3 = 23. This is Ryan's age as he is the older sibling.
20 - 3 = 17. This is Naomi's age.