It depends on how much time you have at hand. If you are short of time, then approach the lawyer and get the affidavit done and keep all documents safely to be shown as the explanation for the difference in name spellings.
If you time around 30-40 days, then you can apply for name correction of Aadhaar card and Pan card.
Aadhaar card name spelling correction can be done
a.via post,
b.online(https://uidai.gov.in/) or
c. by going to the nearest permanent enrolment centre close to you (https://aadharcarduid.com/aadhaar-card-center).
If you are doing it online, keep the relevant self-attested copies of proof of identity and proof of address scanned for uploading.
If you are doing it by post
download the correction form (https://uidai.gov.in/images/UpdateRequestFormV2.pdf) and send it by registered post to any of the regional offices closer to you. (https://uidai.gov.in/about-uidai/contact-us/regional-offices.html)
For PAN card changes also can be done online on the income tax-NSDL government website(https://www.tin-nsdl.com/faqs/pan/faq-pan-reqfornewpan.html). Here step by step instructions are given how to do it (https://tin.tin.nsdl.com/pan/correctiondsc.html). Please read this carefully once and then you can do it online.
Now corrections are being done by agents online for a charge of Rs 1000-2000,
Example: Pancard (https://www.applypanonline.com/changes-correction-pancard-online.php). Please be careful with online transactions for these.