Please note that I adjusted the rules slightly so that if you use a Mega Pokemon that costs less than the base form, it will cost as much as the base form costs. For example, Mega Heracross is only B Rank on Bug, while Heracross is A Rank. Therefore, Mega Heracross still costs $12.
However, if you use a Mega that costs more than the base form, it will cost as much as the Mega does. For example, Mega Manectric is B on Electric, while Manectric is unranked. Therefore, using Mega Manectric will cost $8.