Guess and Test
There are all kinds of ways to find odd angles, but most carpenters simply make a guess and then cut a pair of test pieces to see how lucky they are. The angle of these two walls looks to be less than 45 degrees. A good guess would be about 30 degrees. Divide 30 by two to arrive at the miter angle, and cut a couple of scraps at 15 degrees. Here there's a gap in front, so we need to increase the angle slightly and recut the scraps at 16 degrees. When you've zeroed in on the correct angle, the scraps will fit perfectly, and you can then cut the actual moldings.
Mark, Don't Measure
Holding trim in place and marking it is always more accurate than measuring, often faster and it eliminates mistakes. This is good advice for other types of carpentry work too, like siding, laying shingles and sometimes even framing.