It’s a hard question to answer but I think Derry gave fairly good examples. Unjust means something offends our moral parameters. Those might be, but aren’t necessarily, set by law. Unfair is a lot less serious and never involves a legal issue. It’s just a question of equity. Is something right to do? Is it right for you to give your son a larger slice of pie than your daugter? It’s trivial and a meaningless thing, but your daughter might say. „Dad‘s that’s not fair! He got a bigger piece than I did.“ So unfair is a bit less serious than „unjust.“ Your daughter would never say to you that it was „unjust“ for her to get short changed on the pie. But, if you were protesting a policy decision or a law, you would say „unjust“. It may be a matter of formality or it may just be a matter of emphasis. You’d never say it was „unfair“ that Blacks were subject to racism and segregation in the US South until the mid to later 60s.. Why? Not because it’s too informal, but because it’s too weak a statement. Unfair? What is that a joke? Is racism „unfair“? No one would say that. Was slavery unfair to the slaves? Only a fool would say that. It was not only unjust but a crime against humanity. To call it “unfair” would be absurd. That would be a gross understatement. (I’m White by the way.) You’d rightfully say it was unjust, and even then you’d be putting it mildly. See the difference? These words are not amendable to simple definitions.