
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
A farmer is preparing to plant two types of fruits, A and B. According to a market survey, the cost $y$ (in yuan) of planting type A fruit is related to the planting area $x$ (in $m^{2}$). If the planting area does not exceed $300m^{2}$, the cost is $14$ yuan per square meter. If the planting area exceeds $300m^{2}$, the cost for the excess area is $10$ yuan per square meter. The cost of planting type B fruit is $12$ yuan per square meter.  
$(1)$ When the planting area of type A fruit exceeds $300m^{2}$, find the functional relationship between $y$ and $x$.  
$(2)$ If the total planting area of type A and type B fruits is $1200m^{2}$, and the total cost is $w$, with the planting area of type A fruit exceeding $300m^{2$ but not exceeding three times the planting area of type B fruit, how should the planting areas of type A and type B fruits be allocated to minimize the total cost $w$? What is the minimum total cost?

Present the answer in LaTex format: \boxed{Your answer}
user