When you deploy an application gateway to a Virtual Network, it needs to have an empty subnet to deploy the application gateway resources. As an example shown below, a Virtual Machine exists in a subnet in the Virtual Network domain-net.

This is why we can't use this Network to deploy the application gateway.
So, in our question, the only way to deploy the application gateway is to first stop the virtual machines and deallocate them. This seems to be the most suitable answers from the options given. The other options provided would not assist in the creation of the gateway.
https://docs.microsoft.com/en-us/azure/application-gateway/quick-create-portal