If you own 'example.com' you can create a subdomain A-record to point to its local IP (192.168.1.X or 10.0.X.X) and then access it that way, or you can make up an 'example.com' you can edit the (PC?)'s hosts file
(C:\Windows\system32\drivers\etc\hosts) and create a new entry at the bottom like so:
And any time you access
laptop.example.com on that computer, it will route to the laptop.
You need to make sure also that your laptop allows inbound connections to it, so check out any firewall entries that may need to be modified.
With this, nothing will be accessible from outside your local network. Comment if you have questions.
If you are trying to get your laptop's server to run publicly too, you'd need to either have it run on a separate port publicly, or you use what's called a
reverse proxy to proxy the content via your other server. This can be done in Apache very simply:
ServerName laptop.example.com #publicly set in DNS
ProxyPass / http://192.168.1.X:80/ #local IP of laptop
ProxyPassReverse / http://192.168.1.X:80/ #same as above
What webserver software are you running?