The second answer is correct at that moment. The shore is a continuing obstruction. In accordance with rule 12, Green must keep clear of Blue who is clear ahead. Under rule 10, Blue (port tack) must keep clear of Red (starboard tack) boat but Red (the outside boat) must give Green (the inside boat) room in accordance with rule 19.2(b) Red will also need to give Green enough room to move away from the shore to overtake Blue. (If Red establishes an outside overlap on Blue, Red will also have to give room to Blue.) See also Case 30.