If the ratio is 8:7, there are 8 + 7 = 15 kind of "parts" of the ratio. We know that the total value is 195, so we can calculate what value such one "part" represents:
195 / 15 = 13
So one "part" of the ratio is 13. Now if the ratio is 8:7, then the 8 is for 8 * 13 = 104 out of the total and the 7 is for 7 * 13 = 91 out of the total.
Doublecheck:
104 + 91 = 195, so it's correct :)