When I find a whole row that’s wrong, I usually take the knitted piece off the needles and rip back to the error row and then insert a needle into each st as I pull out the yarn until I’ve undone the row and have all the sts back on the needle. Since you’ve only got 2 rows in error, you could undo st by st putting each st onto a needle for the two rows (or if you feel brave, take the piece off the needle, rip out one row and rip out the 2nd row st by st while adding each st onto a needle). If any sts get twisted, just correct them as you knit the new row.
Actually, it’s pretty good to recognize that you’ve gone astray after only 2 rows. Good checking!