How do I include a JavaScript file and pass the value of a PHP variable with a single function call?
How to combine it togather?


You don't - Javascript files and settings are two completely different things. Anything you add to the settings will be available on the global Drupal object, which will be available by the time the code in your JS file is invoked.

Your code should be:

drupal_add_js(array('variableName' =&gt; 'value'), 'setting');
drupal_add_js(path_to_theme().'/js/backgroundConfig.js');


Or the other way round, it really doesn't matter.