Search online for ex pat Panama taxes and you’ll find links to firms that deal with Panama taxes. Contact one of them for help.
From my brief research it appears to me that (1) the 3% tax you paid is actually tax withheld. The Panama capital gain rate is 10%. (2) A Panama tax return is due on March 30. (3) You’ll be able to claim a foreign tax credit for the capital gain tax you paid. The credit may be less than the amount of tax you paid. See Form 1116. (4) The transfer tax is treated as an expense of sale, reducing your taxable gain.
Please verify any and all of the above by contacting someone familiar with Panama tax because I have no experience with Panama tax.