Only seen first vid and you should have been black flagged for that overtake , as that not good really, if you couldn't pass and get back on racing line and brake safely for corner, then you should have lifted and slotted in behind him
Think safety first on track, it's not a race