
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
As the junior high school entrance examination approaches, the cafeterias of Qi Yi Middle School and Qi Yi Huayuan Middle School carefully purchased two types of ingredients, $A$ and $B$, totaling $600kg$. The price of ingredient $A$ is $5$ yuan per kilogram. When the purchase quantity of ingredient $B$ is not more than $300kg$, the price of ingredient $B$ is $9$ yuan per kilogram. When the purchase quantity of ingredient $B$ exceeds $300kg$, for every additional $10kg$, the price of ingredient $B$ decreases by $0.1$ yuan. Let the quantity of ingredient $B$ purchased be $xkg$ ($x$ is a multiple of $10$).<br/>$(1)$ If $x \lt 300$, and the total cost of purchasing ingredients $A$ and $B$ is $3800$ yuan, find the quantities of ingredients $A$ and $B$ in kilograms.<br/>$(2)$ If $x \gt 300$, and the quantity of ingredient $A$ purchased is not less than half of the quantity of ingredient $B$ purchased, find the quantity of ingredient $A$ in kilograms that minimizes the total cost of purchase, and determine the minimum total cost in yuan.<br/>$(3)$ If the quantity of ingredient $A$ purchased does not exceed $mkg$ ($m \lt 250$), and the quantity of ingredient $B$ purchased exceeds $300kg$, and the maximum sales revenue obtained by the merchant is $4000$ yuan, find the value of $m$.

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