In order to understand the context of Romans 12, you have to go back to the previous passages - this is important, as it changes the command from a general order to a Christian exhortation.
Bless those who persecute you; bless and do not curse them.
Rejoice with those who rejoice, weep with those who weep. Live in harmony with one another. Do not be haughty, but associate with the lowly. Never be wise in your own sight.
So they called them and charged them not to speak or teach at all in the name of Jesus. But Peter and John answered them, “Whether it is right in the sight of God to listen to you rather than to God, you must judge,
1. We ourselves are aliens in this world... this is not our eternal home.
2. We swear allegiance to Jesus Christ, first and foremost.
3. Our desires should not be shaped by this world but by a higher purpose.
None of the rulers of this age understood the wisdom of God; for if they had, they would not have crucified the Lord of glory. - 1 Corinthians 2:8
1. The responsibility of kings is equal to their calling by God. Even wicked kings should acknowledge from whom they derive power.
2. The ruling authorities have no authority (and indeed never did) over Christ.
4. The commands in this chapter are NOT absolute - they wholly depend on whether the law itself upholds good or evil.
5. This does not mean all authority should be obeyed! We don't have to search hard in the bible to find righteous people resisting evil government: Daniel, Moses, Elijah....
Also: No man can serve two masters. /x