Breakdown of ashita no hanabi no koto o kangaeru dake de, wakuwakushimasu.
Questions & Answers about ashita no hanabi no koto o kangaeru dake de, wakuwakushimasu.
This の is also linking nouns, but the pattern X のこと has a special meaning: about X or the matter of X.
So:
- 花火のこと = about the fireworks / the fireworks as a topic
This is a very common pattern in Japanese:
- 彼のことを知っています。 = I know about him / I know him.
- 日本のことをもっと勉強したい。 = I want to study more about Japan.
In your sentence, 明日の花火のことを考える means to think about tomorrow’s fireworks.
