The difference bewtween deontological and teleogical theories is that teleogical theories are the outcome of your actions and deontological is the actions that you perform. Teleological theories are what the consequence or outcome of what your actions do and Kant thinks that this is wrong and that we should act deontologically and act out of duty, not out of compassion. He believes that we should do something, because we have to, not out of compassion or if we think its morally wrong or right, we should just do it. Teleological theories are based on outcome.
If you perform a bad act but the outcome of the act is good than it is considered to be a good act. However deontological theories are based on the act itself. Teleological theories. If you do an act that is intended to be good but actually turns out to be bad, it’s still considered a good act. For example, You and a friend are at school or work place or where ever you go and your friend starts to get bullied, you stick up for your friend but you end up getting into a fight with a bully. You tried to do something good but it also resulted into something bad.
The idea was to get the bully to stop bullying and that was the good act; the fight was the bad act and you may get punished for the bad act but its still considered as an overall good act. The decision of punishment or whether or not it was a good act would be how much it helped or benefited the situation. It would have to be questioned of how much it helped the situation, and what was more for seen (what was intended to happen.. if the good has more reason for the bad)