Where exactly do we put this code? In Apache or some other cofig file?
(Please excuse my ignorance. I'm new to Linux).
I strongly suggest that based on your response you're too new to Linux to trust yourself to change configuration files without risking breaking your server without repair.
Please do yourself a favor and buy and read a good Linux administration book, preferably based on the OS distribution you're running. Eat, sleep, and live the book for a while, until you can answer this sort of question yourself, so if you come across other questions while you're actually making file changes, you won't make the wrong choice.
Until then you should consider hiring an administrator to help you if it's in your budget. Seriously.
But to answer your question, the new lines go right underneath the current NS lines in the zone file for your main domain. You do that from a root login, and the file is generally located at /var/named/example.com.db, where you need to replace example.com with the domain name for which you need to create the nameserver for your subdomain. And then restart BIND.
This won't work unless you know exactly what you're doing. And if you make even a simple mistake, you could break your nameserver, certainly at least break domain resolution for that specific domain.
Jeff