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.
There is neither might nor power except with Allaah. We do not know how come you had sexual intercourse with your wife in the same manner a husband has sexual intercourse with his wife while you are not sure that your taking her back is valid. A Muslim should not act or say something – while not knowing its ruling – before asking the scholars about it especially if it is about such a matter that pertains to sexual intercourse. Allaah Says (what means): {So ask the people of the message [i.e. former scriptures] if you do not know.}[Quran 16:43]
In addition to this, you did not inquire about this except after this long period had passed, so you are negligent in this regard and you are obligated to repent.
As for your statement ‘Okay’, it is not a clear statement of taking your wife back, so this is not considered as taking back your wife even if this happened during her waiting period unless you said it with the intention to take her back. However, this cannot be so since you mentioned that you did not intend to take her back when you said that. However, according to the view of some scholars having sexual intercourse (with the wife) is considered as taking her back provided that this takes place during her waiting period. But you did not have sexual intercourse with your wife except after a period of more than one year.
In general, the waiting period expires much less than this period. For a non-pregnant woman, it is three menses for menstruating women, and three months for non-menstruating women. Thus, what you mentioned indicates that you had intercourse with her after her waiting period had expired and if this is the case, then what happened between you and her was Zina (illegal sex); hence, both of you are obligated to repent.
Also, you are obliged to separate from her. If there are any children from this marriage, then they will be traced back to you if you believed that having sexual intercourse with her was lawful. Ibn Qudaamah said: “If he [the husband] does not know that she is irrevocably divorced from him, or does not know that her waiting period from a revocable divorce had expired, or does not know that this is forbidden for him, and people like him ignore this, then in this case, his children can be traced back to him.”
Now, if you both wish to continue the marital relationship, you are obligated to renew the marriage contract but after making sure that she is not pregnant by her having one monthly menses according to the most preponderant opinion of the scholars. For more benefit, refer to Fatwa 83629.
Allaah Knows best.