Text this: Taxing Strategies for Carbon Emissions: A Bilevel Optimization Approach