Let the 7 letters A through G represent the ages of the 7 person family.
- A = youngest age = min
- G = oldest age = max
7/2 = 3.5 which rounds to 4 represents the slot number of the median, aka the middle-most position. The 4th letter is D. Because the median is 16, we know that D = 16.
We go from this
A,B,C, D, E,F,G
to this
A,B,C, 16, E,F,G
I put a bit of spacing to help show why D is the middle.
-------------------
The modes are 12 and 45, which means those values show up more than once. Let's assume they show up 3 times each.
That tells us A,B, and C are all equal to 12. Furthermore, that assumption indicates E,F,G are all equal to 45.
We go from this
A,B,C, 16, E,F,G
to this
12,12,12, 16, 45,45,45
But we run into a problem. The range is max-min = 45-12 = 33 and not 35 like we want.
We have no choice but to remove one copy of "12" and remove one copy of "45". We need to remove both because removing only one of those would result in the mode being just one value (rather than two).
-------------------
So we have this now
A,12,12, 16, 45,45,G
where A < 12 and G > 45
range = max - min = G-A = 35
G-A = 35 solves to G = 35+A
We can update the set to
A,12,12, 16, 45,45,35+A
-------------------
Now to figure out what "A" is.
The bit of info we haven't used yet is the mean.
Recall the mean has us add up the numbers and then divide by the number of values.
mean = (sum of the values)/(number of values)
mean = (A+B+C+D+E+F+G)/7
mean = (A+12+12+16+45+45+35+A)/7
mean = (2A+165)/7
Set that equal to the stated mean of 23 so we can solve for "A".
mean = (2A+165)/7
(2A+165)/7 = 23
2A+165 = 7*23
2A+165 = 161
2A = 161-165
2A = -4
A = -4/2
A = -2
That's not good. We should have gotten a positive whole number for "A". Since "A" is negative, it means there is a typo somewhere in the given instructions.
It's impossible to have a family of 7 people where the mean age is 23, the median is 16, the modes are 12 and 45, and the range is 35. At least one of those starting values needs to change. If for instance the "45"s were changed to "41", then the equation above would solve to A = 2.
I would ask your teacher for clarification.