All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
If your first vow is conditional upon success in the exams of the first term, then you are not obliged to do anything because the condition, which is success. did not occur. However, if it was not conditional on a specific school term or was not conditional on something, then you should fulfill it in the same way that you have specified.
Moreover, you should fulfill the vow that you made afterwards. Each of them is a separate vow. They are not related to the same issue. Hence, fulfilling one of them does not clear your liability concerning the other.
Allaah Knows best.