KirbysHammer :
My point is that you're not going to get acceptable performance if you don't at least have decent hardware. An overclocked 940m isn't going to offer that in AAA games which I would assume OP's friend wants to play, because they asked for a gaming laptop.
So then, is your implied recommendation not to buy a laptop at all if the budget is limited to $500?
Additionally, the OP stated "basic games". That could interpreted differently by different people. Who knows? Maybe there are people who consider The Witcher 3 and the yet to be released Star Citizen to be "basic games".
A $500 laptop is going to have integrated graphics. The laptop
starscream27, is 8% over the $500 budget, the performance difference between a 940mx and Intel HD 620 is probably something like an 80% - 100% increase depending on the game and the same graphic settings use for both the 940mx and Intel HD 620. That is not bad for going over budget by just 8%.
Is a laptop with a GTX 1050 going to perform better? Sure.
Is a laptop with a GTX 1050 going to be within a reasonable ballpark of a $500 budget? Unlikely.