In this life, you will see many people fall away from the faith. This does not mean they lose their faith or never had faith necessarily, for that is not for us to judge the intent of their heart. As Christians, it is our job to gently restore them. James 5:19-20 says, “My dear brothers and sisters, if someone among you wanders away from the truth and is brought back, you can be sure that whoever brings the sinner back from wandering will save that person from death and bring about the forgiveness of many sins.” There is great reward in restoring those who have fallen away.
So how can restoration be done? First, you must pray for them above all else. God is the one who restores, not us. Pray for that person everyday, that God will draw them back to Himself and that they will long for change in their heart. Second, invest in that person if you have not already done that. Try to spend time with them if they will allow it. When you are with them, do not condemn them, but tell them you are praying for them and even ask them specifically what you can pray about. These two things will allow you to become a trustworthy person in their life. You will have a greater chance of helping restore the person if they consider you to be trustworthy.
Never stop hoping. God is the God of restoration. He restored many people throughout the Bible. Most of all, He restored you and me through Jesus Christ. If He can do that, He can restore anyone.