I will suppose that your laptop GFX card supports using both VGA and HDMI at the same time, and that you use Windows 10 as this is the most common situation.
First of all connect one monitor to the VGA and another to the HDMI connection with the necessary cables. Once this is done you should see the desktop on both the monitors as well as on the laptop monitor.
Right-click on the desktop on any screen and choose "Display settings".
In the Display settings window that now opens you should see the monitors connected. You should see three monitors in the Display settings window. The internal laptop monitor and the two external. If you do not see all three you will have to troubleshoot from there.
Here I have 4 displays, 2 external monitors and one TV while laptop internal is set to disconnected.
So now, if you see all three, you can move the displays in the Display settings window so that they are located the same way as in your real setup. To know what monitor is where, click the button "Identify". Each monitor will show a number. Make a special note of the number that is displayed on your laptop screen.
In Display settings you can now select the external monitors and set the "Multiple displays" setting to "Extend desktop to this display" on both.
Once this is done, select the monitor with the number you saw on your laptop screen and then set its "Multiple displays" setting to "Disconnect this display".
Now you should only have the desktop shown on the two external monitors.
In Display settings you can now select one of the external monitors to be the main display by checking the box "Make this my main display" right under the Multiple displays setting.
That is all.
When you disconnect one or both the external monitors the laptop screen should automatically go back to being main display.