confucianism is teachings which was made by a man named confucius and what he would teach is basically following the beliefs of their ancestors. One main idea of confucianism is basically having your own duty, this means a person places other people's needs before their needs. And with these rules confusius believed there world would do well
Daoism is a peaceful socitey that teaches basically be peaceful don't worry about the world and live in harmony . This is different from the confucianism because confucianism basically is saying everyone does their own part with rules and daoism is saying be peaceful and just wha ever happens happens.
legalism is basically the philosaphy of rules and they believe everyone is bad so cruel and bad punishments and lots and lots of rules will keep everyone good. Many people followed this thinking it would change people good and they would do their duties