Both involve word "passion" in it. Any compelling emotion or feeling is called passion. Passion arises when there is a attachment. Passion can be due to attachments for name, fame, money, sex ...
While compassion is out of love. Out of deep respect and love arising. Compassion has no attachment. Rather compassion is out of pure detachment. One who is free from all the attachments only can be compassionate. His actions are based out of pure love for alleviating the suffering of others. It was purely out of love that he strived. He strived selflessly to alleviate the suffering.
His compassion transformed even the hardcore criminal called Angulimala. Angulimala - means one who wears the garland of thumbs. He killed hundreds of people and wore their thumbs as garland. He even tried to kill Buddha. It was the compassion of Buddha which transformed him and turned him to the path of liberation and enlightenment.
After his enlightenment, Buddha travelled across the country teaching the wisdom of liberation. Ceaselessly, from morning to evening he taught. He offered solace to people who are suffering. It is purely out of compassion.