Something like: for $n score $s in $doc//*[text() contains text 'gauguin' AND contains text 'pissarro']
Looks fine; it should work if you switch "and" to lower case. You may also try:
for $n score $s in $doc//*[text() contains text 'gauguin' ftand 'pissarro']
for $n score $s in $doc//*[text() contains text { 'gauguin', 'pissarro' } all]
Christian