You know the size of the photo. You know the ratio of the frame and also it exactly fits the photo in. So you should be able to find out whcih side of the frame will be exactly the same as one side of the photo.
Once you find out the sizes of the frame, you take the difference of the areas.