Verse 9: Those who have faith and do righteous deeds, We will surely admit them among the righteous.
Ayatullah Jawadi Amuli says that there is a difference between a person who is a Salih (righteous) and a person who is included with the Saaliheen. You can be Salih when you do an action that makes you a Salih but when you are amongst the Saaliheen, then it means you are a person for whom it hasbecome a malaka - you only do good deeds. The only thing that comes from you is righteous actions.
Verse 10: Among the people there are those who say, ‘We have faith in Allah,’ but if such a one is tormented in Allah's cause, he takes persecution by the people for Allah's punishment. Yet if there comes any help from your Lord, they will say for sure," We were 
indeed with you." Does not Allah know best what is in the hearts of the creatures?
Some people believe in Allah only by their tongue. When the 
difficulties come, they change.  When they have to suffer for the sake of Allah, then it becomes very difficult for them.  Note that these people ‘say’ that they believe. They deem the [threat of] hardships of this life as hindrance to their faith – just as the threat of chastisement is a hindrance to sin. These people believe in the benefit and the profit, not in Allah!