Situation: who's wrong, if wrong at all

Im on a 100kmh road behind a van. We're both accelerating but im faster so i overtake the van and pass him. I keep my speed at 100kmh, and looking to move back to the left lane. But the van keeps accelerating and is now speeding and undertaking me. So I let him pass keeping my speed at 100kmh. And when he is clear I move back to the left lane, behind the van.

Should I have stayed behind the van matching his acceleration?