Tax taken out by the foreign country is called "foreign tax credit". If it is paid for the stock you exercised.
However, the company stock you exercised based in the U.S. or is it a U.S. based company? Usually, company stock is exercised as part of the wages and you paid the tax on your W-2.
If it has been reported on a Form 1099-B issued by a financial institution holding for your HR, then, it should also be counted towards your W-2 income. Then, your W-2 income reported is your basis for this stock. That is, your year end W-2 will list how much in the wage income is for this stock you exercised.
If this is a W-2 wage income issue, it is handled for not double taxed by using the Form 2555, foreign earned income exclusion, provided that you qualify for the exclusion.
Let's assume that your question is on the foreign tax credit somehow taxed on your stock sale. The discussion is on the foreign tax and is not on the exercised company stock.
The taxpayer report foreign tax paid in two places. On Form 1040, page 2, line 48, using Form 1116, if required. This is a one-dollar-to-one dollar tax credit deduction.
The second place is to report the tax credit on Schedule A, itemized deduction, of Form 1040, on line 8. This is a foreign tax deduction.
Please feel free to follow up.