"This is a difficult problem for a fifteen-year-old boy."
My guess is that "fifteen-year-old" forms an adjective, but I'm not really sure.
Thank you in advance for your help.
In your sentence
is used as an adjective for boy
In the case of
He is a fifteen-year-old.
it is used as a compound noun.
in contrast to
He is fifteen years old
to say how many years he has been alive.
http://www.grammar.cl/english/compound-adjectives.htm Compound adjectives are written with hypen, and nouns after numbers don't get a plural-s.