To solve this optimization problem, we first need to define our decision variables and the objective function. Let's denote:

- \(x_s\) as the amount invested in the solar energy industry.
- \(x_w\) as the amount invested in the wind energy industry.

The total investment is $50,000, so we have:
\[x_s + x_w = 50,000\]

We want to maximize our return. The return from the solar energy industry is 6% of \(x_s\), and the return from the wind energy industry is 5% of \(x_w\). Thus, our objective function to maximize is:
\[0.06x_s + 0.05x_w\]

Given the constraints:

1. At least 70% of the investment must be in the wind energy industry:
\[x_w \geq 0.7 \times 50,000\]
\[x_w \geq 35,000\]

2. At most 20% of the investment can be in the solar energy industry:
\[x_s \leq 0.2 \times 50,000\]
\[x_s \leq 10,000\]

We also know that \(x_s\) and \(x_w\) must be non-negative since they represent amounts of money.

Now, let's translate these conditions into Gurobi code in Python:

```python
from gurobipy import *

# Create a model
m = Model("Investment_Optimization")

# Define the decision variables
x_s = m.addVar(lb=0, name="solar_investment")
x_w = m.addVar(lb=0, name="wind_investment")

# Objective function: Maximize return
m.setObjective(0.06*x_s + 0.05*x_w, GRB.MAXIMIZE)

# Constraints
m.addConstr(x_s + x_w == 50000, "total_investment")
m.addConstr(x_w >= 35000, "min_wind_investment")
m.addConstr(x_s <= 10000, "max_solar_investment")

# Solve the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Solar Investment: ${x_s.x:.2f}")
    print(f"Wind Investment: ${x_w.x:.2f}")
    print(f"Total Return: ${0.06*x_s.x + 0.05*x_w.x:.2f}")
else:
    print("No optimal solution found")
```