To solve the optimization problem described, we first need to convert the natural language description into a symbolic representation. This involves defining variables for the quantities of each type of machine and then formulating the objective function and constraints based on these variables.

Let's define:
- $x_1$ as the number of regular machines.
- $x_2$ as the number of advanced machines.

The objective is to minimize the total cost, which can be represented by the objective function: $1000x_1 + 10000x_2$.

The constraints based on the problem description are:
1. The factory must complete at least 120 tasks per hour: $5x_1 + 25x_2 \geq 120$.
2. The maximum number of workers is 20: $2x_1 + 5x_2 \leq 20$.
3. Non-negativity constraints, as the number of machines cannot be negative: $x_1 \geq 0$, $x_2 \geq 0$.

Therefore, the symbolic representation of the problem is:
```json
{
    'sym_variables': [('x1', 'number of regular machines'), ('x2', 'number of advanced machines')],
    'objective_function': '1000*x1 + 10000*x2',
    'constraints': ['5*x1 + 25*x2 >= 120', '2*x1 + 5*x2 <= 20', 'x1 >= 0', 'x2 >= 0']
}
```

To solve this problem using Gurobi in Python, we'll need to install the Gurobi library if it's not already installed. This can be done via pip with `pip install gurobipy`. Here is how you can implement and solve the optimization problem:

```python
from gurobipy import *

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

# Define variables
x1 = m.addVar(vtype=GRB.INTEGER, name="regular_machines")
x2 = m.addVar(vtype=GRB.INTEGER, name="advanced_machines")

# Set the objective function: minimize cost
m.setObjective(1000*x1 + 10000*x2, GRB.MINIMIZE)

# Add constraints
m.addConstr(5*x1 + 25*x2 >= 120, "task_requirement")
m.addConstr(2*x1 + 5*x2 <= 20, "worker_limit")
m.addConstr(x1 >= 0, "non_neg_regular")
m.addConstr(x2 >= 0, "non_neg_advanced")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of regular machines: {x1.x}")
    print(f"Number of advanced machines: {x2.x}")
    print(f"Total cost: ${1000*x1.x + 10000*x2.x}")
else:
    print("No optimal solution found.")
```