I think Daniels suggestion to cut the object out of the photo is usually best.
But if for some reason you don't want to cut the object out of the background, you can have two different background images. Since the background is an entity, you can change its sprite in script using the SetSprite method:
...
bkgrndEntity.
SetSprite("scenes\room\background1.bmp");
bkgrndEntity.
SetSprite("scenes\room\background2.bmp");...
...
Or you could create a sprite entity and use the SetSprite method to change the photo at the appropriate time.
Or you could also create two sprite entities --one for each of the photos -- and make one or the other visible or invisible at the appropriate time (using the active attribute.)
Or you could make a sprite entity with two frames -- one for each of the photos -- and set the current frame at the appropriate time (using the CurrentFrame attribute).
Or...
I could go on, but I think you see there are many ways to achieve the same thing. As to which you should use, IMO, it depends on what you are trying to do.