First, you'll need to complete the timed Mega Buddy Research Challenges between Sept 22 and Sept 28. Once completed you'll unlock access to the special Halloween timed research challenge featuring Mega Gengar. Although it is as of yet not entirely clear what the special research tasks will be, It is likely that they will be similar to the timed research challenges featuring Mega Beedrill released in late August. These tasks included catching Weedles and participating in Mega Raids.
Mega Gengar Pokémon GO: How much Mega Energy Will it Need?
Based on the existing Mega Evolution capable Pokémon we can surmise that it will likely take about 200 Mega Gengar Energy to Mega Evolve. While yes, Beedrill and Pidgeot only need 100 Mega Energy to Mega Evolve, Gengar will most likely be more in line with Blastoise, Charizard, and Ivysaur in terms of power, necessitating a higher Energy cost for balancing purposes, making the Energy cost 200 Mega Energy. Luckily this amount will decrease as the Pokémon is Mega Evolved more often.