The point of these verses is about the importance of love and the importance of living by the principles of love. In short, we should treat all people like. Before I explain this further, let me give you the verses.
James 2:8-9 "If you really keep the royal law found in Scripture, 'Love your neighbor as yourself,' you are doing right. But if you show favoritism, you sin and are convicted by the law as lawbreakers."
Galatians 3:26-29 "So in Christ Jesus you are all children of God through faith, for all of you who were baptized into Christ have clothed yourselves with Christ. There is neither Jew nor Gentile, neither slave nor free, nor is there male and female, for you are all one in Christ Jesus. If you belong to Christ, then you are Abraham’s seed, and heirs according to the promise."
As you can see, the general topic is on love. James' point is that the whole Old Testament or Hebrew Bible can be summed up in loving your neighbor. Then he goes on to say that this fact makes favoritism inconsistent with love. Why? We are called to love all people not just the ones we want to. In fact, favoritism, according to this framework is not love.
Paul in Galatians is making pretty much the same point. All people should be treated alike, because, as Paul says, there is no wordily distinction in Christ. In fact, what Paul says is profound. Paul say that the three main divisions in our world - race (Jews and Greeks), class (slave and free), and gender (male and female) - are nowerased in Christ. Hence, the upshot is that we should love our neighbor - no racism, no sexism - no social bigotry.