Is the litter box covered? Do they share one? I have one who does this, if he goes out in the garden to wee, he squats and does it 'normally' but if he is doing it in the house, he will go into the litter tray but instead of squatting, he stands up and sprays out the back. I ended up getting a covered litter tray with a lid and that solved it for me as he still stands up and sprays, but now it just runs down the back and into the tray. Just make sure you buy a decent tray with a good seal where the lid goes on! Other things to try might be an additional tray, some cats don't like sharing a tray so he may be trying to mark it as 'his', but it sounds very much like the problem I was having with mine. Good luck!