… mirroring my iPad to my tv [through Apple TV box]
Several services require an AirPlay 2-supporting receiving device, which the 3rd generation model is not.
So it depends on what you want to mirror.
as I cannot sign in to my iCloud as my Apple TV box is apparently obsolete
AirPlay does not require signing in for iCould services. It does require registering with a valid Apple ID and being signed in for the iTunes Store with that Apple ID account.
and it does not accept Two-factor authentication
There is a workaround for that:
If you have an Apple TV (2nd or 3rd generation) and two-factor authentication for your Apple ID, then you may be asked to type your password followed by the six-digit verification code directly into the password field. Additionally, there is a time limit, after which the code becomes invalid.
Try this: First enter the characters of your password (do not submit yet), then manually request a new verification code, then append that code to the password (no spaces or other separating characters), and then submit. That should help you get passed the time limit.