In these passages Paul tells the Corinthians that men are not qualified to examine other men as God examines them. Got examines the heart and motives. Outward appearances can be deceiving because people hide their motives from other people. People might appear to be doing right in their actions, but their actions may be produced by wrong motives.
So then how can we discern the motives of others? We can’t. However, we can observe the results of what they do. The Bible says that a good person will produce good fruit in their life, and a bad person will produce bad fruit in their life. So, we can determine good from bad by inspecting their fruit or the results of what they say or do. However, this is not easy.
Sometimes good fruit is not realized until a later time. For example, a person’s counsel or words to another may lead them to believe in Jesus Christ. However, this may not be evident until a later time because the change in that person may be gradual. Therefore, we have to be patient in our observance.
However, we can always test everything in light of scripture. If a person’s words or actions do not conform with what the Bible says, then those words or actions are wrong.