Some of the ideas that get juggled about in thoughts of justice are judgement, punishment, liberty, and mercy.
Abraham believed God and it was counted to him as righteousness (Romans 4:3 & Genesis 15:6). If righteousness could come through the Law given to Moses and the Jews, Jesus died in vain (Galatians 2:21) Since righteousness is not properly discerned though obedience to rules and regulations, how is it found?
Right and wrong can be discerned through the fruit of the tree of the knowledge of good and evil. The problems with that source include our inability to agree on what is right and what is wrong, and that even if we agree, the knowledge of good and of evil from that source both produce death (Genesis 2:15-17).
If we see a 1.5″ brown bug at my house, it is a “waterbug” or a “palmetto bug.” The same bug discovered to be infesting your home, however, is a “COCKROACH.” When members of my family or tribe are found to have committed a crime or failure, they deserve mercy. The same fault found in your tribe, however, calls for speedy judgement and punishment to keep it from reoccurring or spreading.
Righteousness is imparted to us as strength to do what is right through the fruit of the Spirit of God (Galatians 5:22,23; Ephesians 5:9). Righteousness is our obedience to the guidance of the Spirit of God (2 Corinthians 3:1-18).
Mercy triumphs over judgement. That’s one reason Jesus didn’t stone the woman brought to Him to judge regarding her sexual sin. In Matthew 18, Jesus described a path to justice that had the intent of restoration of the fallen person, including considering them to be unbelievers if they refused to listen to an ekklesia that was called to judge them. If they were unbelievers, we would be even more responsible for evangelizing them and restoring them to a right relationship with Yahweh.
How do we find the guidance to justice, judgement, mercy, discipline, punishment, and righteousness? We must ask the Spirit what to do in every situation. The Scriptures are useful as a guide, but, as Jesus evidenced by His refusal to simply obey the Scriptures with regard to the adulterous woman, it is the Spirit Who leads us to righteous responses to others’ failures.