Regarding Definition of dikiaow
The term dikiaow is forensic. And while dikaiow often involves a declaration of who is in the right, the meaning is broader than a mere declaration. More broadly, the term has the basic meaning of “vindicate’ (in relation to all sorts of contexts—legal, social, relational).
There are two aspects to justification/vindication. The first is the actual declaring/proving of who is in the right. The second aspect has to do with the rewarding of the one in the right. In a judicial context, the judge not only declares person A to be in the right, but then actually grants person A the commiserate reward of one who is in the right. Both judicial actions fall under the rubric of justification.
Paul frames the soteriological dilemma in two parts. The first soteriological hurdle to overcome is ontological corruption. How can we overcome the Adamic effects of sin? How can we be delivered from its enslaving power and penalty? Paul’s use of dikiaow is primarily concerned with this aspect of sin (both in the present and eschatologically). Further, Paul’s use of dikaiow is focused more on the reward of the righteous person—the second aspect of justification. For Paul, dikiaow speaks about how one is vindicated on the basis of faith, thus accounted a righteous person, and thereby granted the reward of a righteous person—i.e., forgiveness and ontological renewal in relation to sin. In short, participation in the New Covenant. There is an already/not yet aspect to this. Because of faith, we have now a deposit of the complete renewal promised at the resurrection. This aspect of salvation is decidedly accomplished without works and is by faith alone, and is why Paul insists we are not justified/vindicated by works.
Secondly, Paul sees the final assize as a hurdle to overcome. On what basis will someone stand at the judgment? On what basis will a person be shown to be a true child of God—one who is in right relation with God? Paul’s answer is works. The fruit of one’s life demonstrates the reality of one’s relationship with God through Christ. No good works—no vindication at the judgment. But in this, works are not securing salvation, but rather demonstrate one’s relationship with God. For the most part, Paul does not deploy dikaiow language toward this vindication, thus we never find him affirming the axiom “justified by works.”
The connection between these two aspects of Paul’s soteriology is as follows. If one has been truly vindicated by faith in the present, the inevitable result is ontological renewal and a life of good works, which inevitably leads to vindication at the judgment.
James, on the other hand, is not primarily concerned with overcoming ontological corruption, but about living morally in light of the coming judgment (One might infer a whisper of ontological salvation in James 1:21. Maybe.). Will I be found to be a true child of God? Will I be found a true son of Abraham? Secondly, he is less concerned about what the right person gets (so Paul), and more concerned about who is right. He largely skips right past Paul’s ontological angst. Thus when James employs dikaiow language, he is doing so in light of the one soteriological hurdle most on his radar—the final judgment. This is why he can say we are justified/vindicated by works.
Paul’s soteriology is more sophisticated than James’. Certainly Paul would agree with James that one’s vindication at the judgment is based in large measure on one’s works. “It’s not the hearers of the law, but the doers of the law who will be justified.” Yet Paul’s soteriology drives deeper than James, and he is concerned to locate the source of those good works in the ontological renewal (i.e. circumcision of the heart, etc.) secured through union with Christ and the vindication of faith. And it is at this more fundamental point that Paul deploys his dikaiow language.
When we synthesize these two, we come away with the following: a person is vindicated in light of sin and spiritual death by faith alone. Having thus partaken of union with Christ and the subsequent ontological renewal, a person is vindicated at the final judgment by works. The first vindication gives rise to the second.
Note: I'm not using "vindicated" and "saved" as complete synonyms.