
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 shopping mall purchased two brands of basketballs, $A$ and $B$, from the manufacturer. In the first batch, they bought 40 of each brand, spending a total of 7200 yuan. After selling all the basketballs, the merchant planned to purchase another batch of 50 $A$ brand basketballs and 30 $B$ brand basketballs, spending a total of 7400 yuan. The cost of purchasing the $A$ and $B$ basketballs remained the same for both purchases.  
$(1)$ Find the cost of purchasing one $A$ brand basketball and one $B$ brand basketball.  
$(2)$ During the sale of the second batch of basketballs, the original selling price of each $A$ brand basketball was 140 yuan. After selling 40 of them, they were not selling well, so the mall decided to sell the remaining $A$ brand basketballs at a discount. The $B$ brand basketballs were sold at a 30% markup from the purchase price and were quickly sold out. It is known that after selling all the basketballs from the second batch, the total profit was 2440 yuan. Find the discount at which the $A$ brand basketballs were sold.

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