If you've got a compound saw you can do this. Using similar-sized scrap of any flat wood material, lay one piece where it goes and draw the near-vertical outside angle on it. Do the same on the adjoining side. Cut with the saw beveled to 45deg. Now put the pieces together, taking note of what is too open or too closed in the joint angle. Alter the bevel a few degrees accordingly and try again being careful to stay with the first angle on the board, which may require an adjustment of the miter setting! Study the new joint and repeat this process till you've got a good fit. Now use the real thing which should fit. Tweaking the last degree or two will take some patience, just watch what happens at the joint as you make small adjustments to the saw. You can do this on a single-bevel compound by turning one piece upside down, the other right-side up.

Or you can hire a mathematician to calculate the settings for you