If he has a lot of peanut butter in his hair and has used up all the shampoo, you can use dishwashing liquid (Palmolive, Dawn, Ivory, etc.) to lather it out.
But the original stuff may still be in his hair, and unless I know what it is, I can't give you a good suggestion on how to remove it.