Marriage again with same person

In 2015 Mr. Ankit married to Bhumi. Ankit is Canadian citizen and bhumi is Indian citizen. Both married in 2015 with registered them self with authority. After few week they decided to separate and prepared agreement on stamp paper with the respect. Mr. Ankit married in 2017 with Sonal who is Indian citizen. They applied for Canadian citizenship for Sonal. Canadian embassy rejected application stating that, marriage of Ankit with Bhumi is not properly divorced by endorsing from court judge. Hence, marriage between Ankit and Sonal not valid. Ankit has taken court divorce in Apr 2019 with Bhumi. Now, does Ankit and Sonal require to re-marriage in legal. Not taking court decree makes Ankit and Sonal marriage illegal. If yes, what is process for that. Do Ankit and Sonal require to take divorce and marry again. If previous marriage of Ankit with Sonal not legal because of improper divorce of Ankit with Bhumi. Why does it require divorce of illegal marriage. If same couple decide to marry again does it require to hv divorce ??? Please guide.