Hello,
It depends on what title you are going to play. I would recommend buying the former laptop (i7 7300hq) since the CPUs are very similar. There is only a performance difference of about 5% (http://cpu.userbenchmark.com/Compare/Intel-Core-i7-7700HQ-vs-Intel-Core-i5-7300HQ/m211019vsm223877).
The extra video makes a differences in some games, playing them at a high resolution. Also check out the article linked down below.
I hope my answer helped!
Best regards,
Freddi