Upvote:1
You need to show your test results for Sri Lanka when you check in for ticket #2 in PTY. That means you need to take the test no earlier than 96 hours before your departure in PTY. Assuming you are using Turkish airlines the sample must be taken no earlier than 6:30pm on 06/17 Panama time (GMT-5).
Note that this is 7:30pm in the Bahamas (GMT-4) which is currently an hour ahead since Panama does not observe daylight savings time. This will likely be too late for 6/17 so in all likelihood you will want to get tested on 6/18 as early as is feasible.
Please note that separate test requirements may exist for your flight from NAS to PTY. These requirements would be from Panama. I believe that's currently "All travelers will be required to present a negative COVID-19 PCR or antigen test taken no more than 48 hours prior to their arrival time in Panama." You may be able to do a quick test on arrival.