Ok so i recently bought a new acoustic guitar but i came across this problem.

When i play for example the 5th fret of the D string and play the octave on the B string 7th fret i always have to go up a semitone to get the octave. The same thing happen with the high E strings.

Is this an intonation problem and how would i go about solving this?

Well, assuming you're using standard tuning (E-A-D-G-B-E) then I don't think there's any problem... the 5th fret of the D string is a G (G3 to be exact)... and G is found again, one octave higher (G4) on the B string, at the 8th fret.

So if you are looking for it at the 7th fret, you're just looking a semi-tone too low... it's supposed to be at the 8th fret.