When building a prestige building by using the 4th row of the royal favours table (e.g. after winning a royal favour as the player who built the most houses on the castle) that gives you more favours, is it permitted to use these very favours to construct another buidling? In other words, is it considered "building" the blue building, part of the same phase? I know that in general, during the same phase you're not allowed to use the same row.
Let's say I've already placed my marker at the first column of the 4th row at the royal favours table. After I win another favour, am I allowed to advance my pawn to the 2nd column, even if I don't have the materials to build a wooden building?
Rules reference here
1) No, you may not build another building. As you are aware the rules say: -
If a player gains several favors during the same phase (for instance, during a count or when the monument is built), the favors must be used on different lines. So, it is impossible to gain more than 4 favors in a phase.
You gained the favour allowing you to build in phase 6, building the castle. If you build a building that give you more favours the phase has not changed.
2) Yes, You advance your marker unless prevented by the stage of the game (ie building the keep, walls etc).
Whenever a player earns a favor, they must choose a line at once, and, if it is possible, advance their marker to the right. Then, the player can use one of the effects provided on the chosen line, between level 1 and the level currently indicated by the marker.
The restriction on moving the marker is the stage of the game, not if you are able to carry out the action. Don't forget when moving on the favour track you don't have to carry out the action you move to, you can select any of the action you passed on that row. Also if you are the end of the row you can still keep selected that row and carrying out any action.