Not quite right. Scrolls of levels 4 and 5 can be used after capturing Pandora with the appropriate magic. No "buts" about it.
In the example you provided, it turns out strangely, as if it is impossible to use a scroll of level 4 or 5 if a Mage Guild of the corresponding level is built in the city.
Another attempt.
"5.8. It is forbidden to use spell scrolls of magic levels 4 and 5 without building a Mage Guild (MG) of the corresponding level in any of your castles.
If there is no Mage Guild of the corresponding level in the starting castle, then you must act according to subparagraphs a and b of paragraph 5.2."
Hence, 3 conclusions:
1. It is allowed to use spell scrolls of magic levels 4 and 5 after building a Mage Guild (MG) of the corresponding level in any of your castles.
2. If there is no Mage Guild of the corresponding level in the starting castle, then you must act according to subparagraphs a and b of paragraph 5.2. /i.e., starting as the Swamp faction, you can use, for example, a City Portal scroll after opening Pandora with all the magic of the earth, regardless of whether the hero opening it has the required wisdom/
3. If there is a Mage Guild of the corresponding level in the starting castle, then paragraph 5.2 "b" does not apply to the scrolls /i.e., starting as the Castle faction, you cannot use, for example, a City Portal scroll after opening Pandora with all the magic of the earth, regardless of whether the hero opening it has the required wisdom/