Put navy beans, chicken broth, water, tomatoes, carrots, onion, and celery into an electric pressure cooker (such as Instant Pot). Seal pressure cooker and turn the venting knob to point at "Sealed." Press the "Manual" button for high pressure and set timer for 45 minutes. When countdown is complete, release pressure naturally according to manufacturer's instructions.
Remove lid, stir in pork and beans and ham. Season with salt and pepper.