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 is His Slave and Messenger.
Saying, 'I will perform such-and-such Rak‘ahs after the Maghrib prayer', is not considered a binding vow that should be fulfilled, according to our view, unless you held the intention of taking a vow when you uttered this statement. A vow is valid and binding when the vow-taker utters a vow-formula suggesting commitment, such as, 'I vow to Allaah, the Exalted, to do such-and- such', and the like.
The formula that you used does not suggest commitment, it is more like a promise. From an Islamic point of view though, it is desirable to deliver on such a promise, although it is not an obligation. If a person intentionally and willingly fails to fulfill it, then he bears no sin for that.
Allaah Knows best.