
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 certain factory decided to purchase $6$ machines for production expansion. There are two types of machines, type A and type B, available for selection. After investigation, it was found that purchasing $3$ type A machines and $2$ type B machines would cost a total of $31$ million yuan. It was also observed that purchasing one type A machine costs $2$ million yuan more than purchasing one type B machine.  
$(1)$ Find the cost of one type A machine and one type B machine, respectively.  
$(2)$ If the budget for purchasing machines does not exceed $34$ million yuan, how many type A machines can the factory purchase at most?

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