two very different vehicles. Forester is a compact SUV, CX-9 is a full-size SUV. CX-9 if you need lots of space, comfort, and head-turning ability. Forester is a very well-built machine, but Subaru's aren't very well known for comfort, or styling. Mazda is more of an all-around vehicle. Subaru engines are built to be abused, but Mazda's still last for a long time with no major repairs for as long as you maintain it properly, and don't drive like a maniac everyday.
Also, consider the size difference of these two vehicles' engines - you'll be making stopovers a lot more often in a CX-9.