I'm happy that my friend's boyfriend dumped her
What's there to be happy about?
I can finally be with him instead of her
While this may feel great for you, your friend will be extremely hurt if you start dating her friend immediately after they broke up. Won't most people think you're being a very bad friend?
I'm not being a bad friend.
You see it as something not that bad, but have you thought about how you'd feel if she started dating a guy you had just broken up with?