You can use two VirtualHosts with different ServerName. The first VirtualHost will run in Apache module mode under PHP 8.2 and the second will run in FCGI mode under PHP 7.
But you can't have two different MySQL versions.
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons