A +25 adds 25 to the total cap. You start with 225, get +5 at 6 month, a +25 then makes your cap 255 (225+5+25).
What stat(s) you raise is/are up to you. Use it any way you want. I believe there is a hard cap of 125 on any one stat, however. Disregarding clothing/jewelry/gear bonuses.
So, If you invested the 6-month 5 on STR for 105 cap on it, you can go an additional 20 of the +25.