This is not like a microwave, where you nearly double the cooking time if your cook two frozen meals at once. You can start the larger ham in the oven first and add the smaller one when its time comes. In other words, do the math for each ham and cook each for the right amount of time. So if one ham will take four hours and the smaller one three hours, put the larger ham in the oven, wait an hour, and then add the smaller ham.

You might add 15 or 20 minutes to the total cooking time to account for a modest decrease in the oven temperature when you put the relatively cool second ham in the oven, but essentially you just want to cook each for the right amount of time.