All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The hadeeth which you mentioned was reported by Ahmad, Ibn Maajah, and others on the authority of Tameem Ad-Daari, may Allah be pleased with him. Its wording is, "The first thing for which a person will be brought to account on the Day of Resurrection will be his prayer. If it is found to be complete, then it will be recorded as complete, and if anything is lacking in it, Allah will say to His angels, 'Look, and see if My slave has offered any voluntary prayers with which to complete his (missing) obligatory prayers.' Then the zakaah and then the rest of his deeds will be reckoned in a like manner."
This completion is in whatever the person has neglected regarding the manner of the prayer or the prayers that he missed mistakenly or out of forgetfulness, meaning the prayers which he did not perform in the first place. This does not include the prayers which he deliberately missed.
Imaam Ibn Abd Al-Barr said in At-Tamheed:
"With regard to completing the obligatory prayers with the optional ones, then this is in regard to – Allah knows best – the one who forgot the obligatory prayer and did not perform it, or he did not perform its bowing as required and did know the extent of that. As regards the one who deliberately misses the prayer or forgot it and then remembered it but he did not make up for it deliberately and engaged in performing optional prayers instead of performing his obligation while he knows that he did not perform it, then his optional prayer does not complete his obligatory prayer, and Allah knows best."
Imaam Ibn Hazm said in Al-Muhalla:
"The one who deliberately misses the obligatory prayers and only performs optional ones in order to complete the prayers that he had missed out of disobedience while persisting on this, then this person is disobedient in his optional prayers, as he placed them in other than their place, because Allah did not legislate the optional prayers so that the obligatory prayers would be left out; rather, the supererogatory prayers are legislated for more goodness and more optional acts. It is this that completes the missed obligatory prayers."
Based on the above, whoever deliberately misses some obligatory prayers, then they are not completed by the supererogatory prayers, and, according to the majority of the scholars, he must make up for those obligatory prayers; and this is the view which we adopt here at Islamweb.
As regards how this is calculated and what supererogatory prayers can be considered as a replacement for the missed obligatory prayers that a person had missed out of forgetfulness, then it is Allah Alone Who knows this, but Allah is just, and He does not wrong people even with an atom's weight of deeds; rather, He multiplies the good deeds out of His Favor and Bounty, and He forgives the bad deeds.
Allah knows best.