To understand Peter's conclusion in Acts 10:34, you'll need to understand his false premise going into his meeting with Cornelius.
And he said unto them, Ye know how that it is an unlawful thing for a man that is a Jew to keep company, or come unto one of another nation; but God hath shewed me that I should not call any man common or unclean.
Now if you look in scripture for that "unlawful action" for a Jew to keep company with a Gentile (or nation as in 10:34), you won't find it in the 39 (Protestant) book of the bible. You will, however, find it in a Tradition book called Jubilees. That book was more influential at the time than the Old Testament. Indeed its view of things made it into the Christian church subsequently.
Remember Christ instructed the apostles to spread the Good News from Jerusalem to the ends of the earth. After His ascension, God had to show Peter three times a vision of clean and unclean to get him to follow instructions (Acts 10:9-16).
Paul had to explain the Gospel that it was promised to Abraham that all nations were included (Galatians 2).
BOOK of JUBILEES TRADITION
Separate thyself from the nations, And eat not with them:
And do not according to their works, And become not their associate;
For their works are unclean, And all their ways are a Pollution and an abomination and uncleanness.
Chapter 22 p16
That influential Tradition was directing Peter's words and actions. It was subverting the Good News. Again, it took a 3-time vision from God Almighty to change his thinking and changing, then going to the gentile Cornelius (representative of the nations).
The OP asks specifically about "respector of persons" and about "worketh righteousness".
As shown the first answer is that God is not a respector of one's nationality or religion.
But that is not to say that anything goes, but rather whosoever "works righteousness".
What is that work?
Jesus answered and said unto them, This is the work of God, that ye believe on him whom he hath sent.
Christ had to instruct Peter and come against a very determined Tradition about who could be saved and what that requires.
Once God got through to Peter via a vision, breaking the hold that the Book of Jubilees had on him, Peter obeyed and visited the nations (Cornelius).
When God poured out His Spirit, as Peter exercised the Keys to the Kingdom given from Christ to him, Peter exclaimed as he did. God is no respector of persons but accepts anyone who works righteousness.
Moreover, Paul too understood this two-pronged structure.
Where [in Christ] there is neither Greek nor Jew, circumcision nor uncircumcision, Barbarian, Scythian, bond nor free: but Christ is all, and in all.
This attitude permeates Paul's work, apostle to the nations.
That the Gentiles should be fellow heirs, and of the same body, and partakers of his promise in Christ by the gospel:
For whosoever shall call upon the name of the Lord shall be saved.
And again Peter confirms the same one body, one faith later in Acts after Cornelius at the first Jerusalem Council against those who would try to muddy the truth of the Good News.
And put no difference between us [Jew} and them [Gentile/nations], purifying their hearts by faith.
Flows like a river ...