Trying to understand clearance regulations on woodstove chimneys
It means what it says. If you go 10 feet from the chimney in any direction horizontally, you need to be at least 2 feet above the roof. Which means that your chimney is poorly located, if it's within 10 feet of a higher roof. So it needs to be 12 feet tall, if that's what it takes. Wind currents over that higher roof can cause downdrafts in the chimney - and that sort of thing is precisely what the language is there to prevent.

Depending how far along your install is, you could potentially move the chimney so it's more than 10 feet from the second story.