"Self-righteous" means someone who thinks they are better morally. Example:
Woman: Do you think people who steal food so they won't starve is still considered stealing?
Man: Yes I do, stealing is stealing no matter what.
Woman: Even if they're starving? Wouldn't you at least pity them? What if you were in their position, you'd probably steal too.
Man: No, never. Stealing is wrong, even if it's for food. They should go jail for the crimes.
Woman: You're so self-righteous, it's as if you've never done anything wrong in your life. You can't even forgive others.
The term "barely-legal" means someone who is around 17 years old and is approaching 18. It's a term that is usually used with a sexual connotation because of the U.S. laws that protects children under the age of 18.