One tip I emphasize a lot here is to use lots of formatting.
Going a bit overboard with formatting is always better than not doing enough. You did fairly well with what you have, but it could be improved by breaking up the big chunks of text.
Also, it's important to clearly state what you are asking of the readers in the first sentence of the post, and why your question is so long. If they understand right off the bat that it's a long question from an exam you took they will understand. Otherwise, people see the first sentence or two of a rambling post and will just downvote and move on.
Lastly, quote the context if that's what's making the bulk of your post. People like having the freedom of just jumping down to the question you are asking and then going back up to skim the passage, as opposed to being forced to read it all without knowing exactly what they are looking for.
Other than that, you just have to do your best in guessing what information is required and what can be left out in order to keep it at a reasonable length.