In your same Mac open a new tab ( use command and T keys ) , enter iforgot.apple.com in the url bar , enter the mail address say example1@icloud.com
Click on forgot Apple ID and password .
Two options will be shown reset through rescue mail and by answering security questions .
If you have checked the box ( b ) of answer security questions , in that scenario the password can also be reset using the month / day / year of your birthday ( click on the drop down arrows of month , day and year and fill up credentials ) .
An option will be shown ( a ) back ( b ) continue .
Verify your birthday to continue , fill up the credentials and click on continue , a small circle rotates
A window appears answer your security questions , fill up the credentials and click on continue , a small circle will rotate .
It will prompt.
Enter a new password ….
Verify password …..
Your password must be at least 8 characters , include a number , an uppers case letter , & a lower case letter .
So fill up the credentials it will show ( a ) back ( b ) continue .
Click on continue and save .