A pure solution without jQuery:
function chbg(color) {
document.getElementById('b').style.backgroundColor = color;
}
<div id="a" onmouseover="chbg('red')" onmouseout="chbg('white')">This is element a</div>
<div id="b">This is element b</div>
JSFiddle: http://jsfiddle.net/YShs2/