## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The construction company wants to maximize its profit by producing the optimal number of marble and granite countertops given the constraints on cutting and polishing hours.

Let's define the decision variables:
- \(M\): the number of marble countertops to produce
- \(G\): the number of granite countertops to produce

The objective function to maximize profit (\(P\)) is:
\[ P = 500M + 750G \]

The constraints based on the available hours for cutting (\(C\)) and polishing (\(L\)) are:
- Cutting: \(1M + 1.5G \leq 300\)
- Polishing: \(2M + 3G \leq 500\)
- Non-negativity: \(M \geq 0, G \geq 0\)

## Gurobi Code

To solve this problem using Gurobi in Python, we will use the Gurobi Python API. First, ensure you have Gurobi installed in your Python environment. You can install it via pip if you have the Gurobi license and the Python package available.

```python
import gurobi

def solve_countertop_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the decision variables
    M = model.addVar(lb=0, name="Marble_Countertops")
    G = model.addVar(lb=0, name="Granite_Countertops")

    # Define the objective function
    model.setObjective(500*M + 750*G, gurobi.GRB.MAXIMIZE)

    # Add constraints
    model.addConstr(M + 1.5*G <= 300, name="Cutting_Constraint")
    model.addConstr(2*M + 3*G <= 500, name="Polishing_Constraint")

    # Optimize the model
    model.optimize()

    # Print the status
    if model.status == gurobi.GRB.Status.OPTIMAL:
        print("Optimal Solution:")
        print(f"Marble Countertops: {M.varValue}")
        print(f"Granite Countertops: {G.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("The model is infeasible or has an error.")

solve_countertop_problem()
```

This code defines the problem in Gurobi, solves it, and prints out the optimal number of marble and granite countertops to produce in order to maximize profit, along with the maximum achievable profit. If the problem is infeasible (i.e., there are no solutions that satisfy all the constraints), it will indicate that instead.