Keeping the loyalty of both Miranda and Jack
Your Paragon/Renegade score has to be at the level just below Max, however if you alienate one of them you do get another chance to get their loyalty back (anytime before you head through the "main" portal), but then your chosen alignment has to be maxed out.
Short of actually going through the confrontation to see if you get the option, you can't really tell.
Save before doing the second loyalty mission, so you can revert if you have to.