Cats usually WANT to use their litter boxes. So when a cat is having accidents, it's usually a sign that something is wrong medically. I would take them both to the vet and get a checkup and urinalysis. A common problem when you see this is a urinary tract infection. It could only be one that is sick, and the other is just pee/pooing over his messes to put his scent there, too.
But either way, you won't know if one or both is sick until a vet visit is done. When you tell them what's going on, they will probably recommend the urinalysis (I'd be surprised if they didn't).
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.