To solve the fruit investor's optimization problem, we first need to define the decision variables and the objective function. Let's denote the amount invested in each industry as follows:
- $A$ for the apple industry,
- $O$ for the orange industry,
- $P$ for the pear industry, and
- $B$ for the banana industry.

The objective is to maximize the total return on investment, which can be calculated using the rates of return given for each industry. The total return $R$ can be expressed as:
\[ R = 0.05A + 0.06O + 0.03P + 0.08B \]

Now, let's list the constraints based on the problem description:
1. The total amount invested cannot exceed $300,000:
\[ A + O + P + B \leq 300,000 \]
2. The amount invested in the banana industry cannot exceed the amount invested in the apple industry:
\[ B \leq A \]
3. The amount invested in the orange industry cannot exceed the amount invested in the pear industry:
\[ O \leq P \]
4. At most 30% of the total amount can be invested in the banana industry:
\[ B \leq 0.3 \times (A + O + P + B) \]

To ensure that we are maximizing the return and adhering to all constraints, we'll use these equations and inequalities to construct our Gurobi model.

Here is how we translate this problem into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Fruit_Investment")

# Define the decision variables
A = m.addVar(name="Apple", lb=0)
O = m.addVar(name="Orange", lb=0)
P = m.addVar(name="Pear", lb=0)
B = m.addVar(name="Banana", lb=0)

# Objective function: Maximize return
m.setObjective(0.05*A + 0.06*O + 0.03*P + 0.08*B, GRB.MAXIMIZE)

# Constraints
m.addConstr(A + O + P + B <= 300000, name="Total_Investment")
m.addConstr(B <= A, name="Banana_vs_Apple")
m.addConstr(O <= P, name="Orange_vs_Pear")
m.addConstr(B <= 0.3*(A + O + P + B), name="Max_Banana_Percentage")

# Solve the model
m.optimize()

# Print results
for v in m.getVars():
    print(f"{v.varName}: {v.x}")

print("Objective:", m.objVal)
```