Mercutio’s death sets off a chain of events that leads to Romeo and Juliet’s death when Romeo is banished.
Tybalt was a Capulet and Romeo was a Montague. When Tybalt saw Romeo at the Capulet ball, he got upset. He wanted to fight Romeo then, but Lord Capulet would not let him. Tybalt caught up with Romeo later. He started a fight that resulted in his killing Mercutio instead of Romeo. Romeo refused to fight, so Mercutio stepped in. Romeo tried to stop the fight and Mercutio was killed under his arm.
As much as Romeo did not want to fight Tybalt, when Mercutio was killed he had no choice. He had to avenge Tybalt’s death. After he did so, the prince punished him with banishment. Actually he should have been executed, but the prince took pity on him. Still, for Romeo being banished was just as bad as being executed because it took him away from Juliet.
A gentler judgment vanish'd from his lips,
Not body's death, but body's banishment.
Ha, banishment! be merciful, say 'death;'
For exile hath more terror in his look,
Much more than death: do not say 'banishment.' (Act 3, Scene 3)
Romeo’s banishment led to Juliet faking her death. Her parents did not know about Romeo, and she could not tell them. With Romeo gone, she was left to her own devices. They wanted her to marry Paris. Before she knew it a wedding was planned, and she had no choice but to go along. She did not seem to know how to get the message to Romeo.
Friar Laurence tasked Friar John with getting a letter to Romeo. Alas, Friar John was waylaid by a plague!
Who bare my letter, then, to Romeo?
I could not send it,--here it is again,--
Nor get a messenger to bring it thee,
So fearful were they of infection. (Act 5, Scene 2)
Because Romeo did not get the message, he went to Juliet’s tomb and thought she was dead. He killed Paris, and then killed himself. When Juliet woke, she found him actually dead and killed herself. The events are all connected.
Romeo and Juliet might not have had a happy ending if Tybalt had not intervened. However, his fight with Romeo resulted in their deaths because Prince Escalus forbade the Montagues and Capulets from fighting. He did not execute Romeo, but he did banish him. Romeo and Juliet did not react maturely.