Correcting one's intention

Q: A person does an act of Sadaqah-E-Jariah with a corrupted intention. Maybe contributing to a Masjid, distributing a Deeni kitaab etc. Perhaps the intention was one of pride and show.

  1. Does the magnitude of the person's sin and disobedience in the sight of Allah Ta'ala continue to multiply and grow as people use/take  benefit from the action he has done? Then, the same person later on realizes his error of having a corrupted intention and accordingly makes taubah.
  2. If his taubah is accepted by Allah Ta'ala, could he now start receiving reward for his initial action?

Being pleased with Allah Ta'ala in whichever condition one may be

Q: I have it incredibly difficult. I do not know where my future will bring me. I have now waited about 7 months to get into the university. In January, there was a new class that started. but I still did not get admission to medical school. I have sent them emails and they have said that when some students quit they will be releasing new offers but only for some students (they have the list of them). I want this more than anything else. I want to do this for my parents I want them to be proud of me. But I feel that everything seems impossible and very difficult now. When I was in high school I had very good grades but at the end of the school year my grades went down. I do not know how, we complained but the school didn't help me. All my other friends got admission some in Norway and in other countries, they are studying and they are happy. They have a future. I have not told anyone this, not even my parents. I am a loser, I am not studying something. I have worked hard for this for so many years. School ends in June and I must wait two years. I can not waste so many years. Please how can my hajat get fulfilled? Any wazifa or dua I can do?