Ah, the suspended hyphen.
18- and 19-year-olds
It's the same as "We offer two- and four-week sessions." or "It comes in 2-, 4-, and 6-inch lengths."
If you have two (or more) hyphenated phrases that end the same way, you can use the hyphen after the first one and "suspend" the rest of the phrase until the second one.