Damon and Stefan both belong to Klaus' Sireline, then why do they repeatedly try to kill him knowing that if Klaus dies, then they will die too?
Initially nobody knew that a bloodline would die if an original died, seeing nothing like that happened before until Finn Mikaelson died during episode 18 of season 3.
After that nobody knew who belonged to which bloodline so they were willing to take the risk of killing themselves seeing Klaus was too dangerous to be left alive. Because Klaus was more than willing, and able, to kill all of them.
The risk was about 25% seeing there were 4 bloodlines left: Klaus, Rebekah, Kol and Elijah. So a 1 in 4 chance of dying when they kill Klaus, a 100% chance of dying if Klaus gets in another tantrum and wants to kill them.
In the show itself it was never confirmed who belonged to what bloodline, only in an out-of-universe interview.