Complex sentence: The song is performed towards the end of the musical, in it the two are singing farewell to one another.
Split into simpler sentences: The song is performed towards the end of the musical. In it, the two are singing farewell to one another.