Select problem

Select problem

hi
There is an issue
i wanna select an element with such a format $( someVariable + ' p span'). but bad luck it's a syntax error, so  what should I do to do the stuff ?
 
Help please