My name is ***** ***** I’ve been involved professionally with dogs in the health and behavioral fields for over 18 years. It will be my pleasure to work with you today.
Dogs grieve when a companion dies just like we do. Often it is how we are affected that intensifies the dog's reaction to the passing. It usually helps to do things that you don't normally do such as take him to the pet store, or new parks. Start different activities. If he hasn't had obedience training in a while, then start back up training. This gives him something to occupy his time and he gets your attention which is helpful at preventing inside elimination.
You need to also keep the spots cleaned up well with a good high quality ENZYMATIC pet odor eliminator. It has to soak in as long as the urine or fecal matter did to break down the protein that causes the odor. The obedience training should also help if the dog now believes he owns the territory and he is marking his area. If he sees you as the boss, it is your territory not his and that help prevent marking.
It often helps to increase walks and try and keep the house at the center of the walk, so he has to mark all the way around on his walk which reduces the amount of urine he has available to mark. Often you need to retrain a dog. Using the method you trained him with originally works best but crate training can be used as well. Here is a site with more information on crate training.
In addition, put a bell or other noise maker on the door low enough for the dog to reach. Each time you take the dog out, ring the bell. The dog will associate ringing the bell with going out and one day ring the bell to signal to you that he needs to go out. He may have just followed the older dog out when he went and may need a way to let you know on his own.
Try my suggestions and see if you don't see some improvement.
I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer positively so I am compensated for my time.