Hi Lucy, others have given you the answers you need. Now that you have those answers I reccomend that you have a read through law 11 to consolidate you knowledge of offside law. Its quite important that you, as the referee, understand it's intricacies as in your original scenario, there are still some dinosaurs out there who think that's offside. So, you need to be confident in not incorrectly penalising offside in that scenario.
In addition to reading the text in law 11 there are some great diagrams in the back of the book, in the practical guidelines section. You'll find these on page 203-209.