At what line in a file should I add a new variable
I assume you mean CRM/Core/Config/Variables.php

If you're adding something to that file that you're going to submit as a pull request or patch back to core, put your changes where they fit most logically.  It'll make more sense to others in the future.

If you're doing a site-specific customization and want to edit the file, don't.  You'll have trouble when it comes time to upgrade.  Instead, create an extension.