From an objection can be gathered the worldview or understanding from which that objection comes. For example, if the Qur'an asks the question, 'How can Allah have a son, if he has no consort?' we know that the person who wrote this believed the Son of God means that God has a divine goddess wife with whom He procreates to produce Jesus.
Similarly, by asking, 'how can obedience lead to righteousness, when righteousness is said to be a gift of God' we can deduce that the one asks it has a concept of grace where it cannot or does not enable and produce good works/obedience. (Otherwise you wouldn't say, 'how can grace do x when [grace doesn't do x]?)
It might help to note that virtually everone already believes in multiple 'causes' of salvation. Faith is the instrumental cause (that which is used in the bringing about) of salvation. God would be the efficient cause (that which brings about). I don't know of anyone who rejects this obvious, valid distinction (who thinks God's saving is at odds with salvation 'by' faith?) Just as indispensible as the faith without it is impossible to please God is simply that it's true faith—that there are the good works and fruit of such faith, which necessarily follow true faith: it is refusal to follow up in this way, with the grace given you, that is counted as evil, and thus a real and not ficticious obstacle to heaven (Jesus came to take away evil, not change God's attitude to sinners who remain sinners); it's also why obedience (saying yes to the graces and promptings of God to do good, when He gives the means to follow through with such) is seen as leading to righteousness, heaven, life and sin as leading to death, hell, shame: you are really committed to real good and real evil respectively. You are not less responsible for your sin in Christ than before; if anything it's much worse than if you had not known Christ and tasted the heavenly gift, and your responsibility isn't only theoretical (I would be responsible 'if Christ hadn't...').
The New Testament speaks of saving faith not as a mere assent to truths, but as one that works through charity. Jesus goes so far as to say those who profess faith but don't forgive others, don't make use of their grace to 'make good' and be fruitful, those who don't feed the poor, clothe the naked etc. were 'never known' by Him, and He wants nothing to do with them: Jesus, as the new Adam, came to restore Eden and perfect righteousness, not make a fallen Eden a tolerable place! St. Paul describes it thus:
Galatians 5:6 (DRB) For in Christ Jesus neither circumcision availeth any thing, nor uncircumcision: but faith that worketh by charity.
Notice the interesting parallel in Corinthians:
1 Corinthians 7:19 (DRB) Circumcision is nothing, and uncircumcision is nothing: but the observance of the commandments of God.
One must note the true parallel: real sin leads to real death. Real righteousness leads to righteousness, life. This idea of 'imputed righteousness' without that imputation being of righteousness itself is not supported by the Old or New Testament. Did God count Abraham righteous because he was good for believing, or did he 'add' righteousness to some moral account with or without Abraham showing any righteousness first (by his faith)? The answer is a no-brainer. 'Fictiticiously righteous' ('I have the righteousness of Christ, but am not righteous myself') people do not solve the problem of Eden, which is what Christ came to do.
So if real faith produces real works of necessity, obedience is freely the work of God (and it has been by God you have been made righteous and saved, because you opened the valve to let God in, you don't bring about what was accomplished by what came through the valve), however, if you disobey, you are deliberately saying no directly to God, whence sin arises (and thus it has been by you that you are fallen away, not God, who is faithful to heal you and make you righteous when you open the valve to let Him in, so to speak).
In other words, in real New Testament grace-driven righteousness, there is no room for boasting. The 'bad kind' of works spoken of St. Paul were not the good works themselves, but the attitude toward them and the worldview in which they were done: to make God owe something. To 'muster up if possible' some 'goodness' from 'within.' You sin, then you muster up in the decency of your repentance heart some 'payback' for your sin. St. Paul says no: who has given to God first so that He should thereafter pay him back? That's not why New Testament good works are done, or what doing them ending up with heaven means. They are done to conform us to the image of the Son, in righteousness, not by a mere legal jot on a piece of paper (no 'legally' righteous people in heaven!), but in fact and indeed. Otherwise, Christ didn't come to restore perfect Edenic righteousness, but to make the fallen and exiled of Eden simply 'tolerable.' No new creation. No new man. No real regeneration. Etc. The whole thing would become a story about how God needs to be convinced to overlook sin. Not that He took away sin, and that only we can take hold of it again if we so choose: leaving going to heaven the work of God, and going to hell the work of man.