I came up to these tabs showing a power-chord like chord on A and G strings. How exactly can I play these without interfering with the D string?
On an electric guitar with typical string spacing, it would actually be more difficult to play that without muting the D-string than with muting. Chances are, if you finger the octave just like you would the fifth in a two-string powerchord but one string higher, the index finger will already be resting lightly on the D-string and thus prevent it from sounding as an open D. Hover specifically for the 7th and 5th fret, the D string likely would sound as a natural harmonic (flageolett) A, which is also no good here. To prevent that, one option is to finger the entire thing as a three-string powerchord (E B E) with index, ring and pinky, but not actually press down the ring finger on the D-string. This way you should get reliable muting.
An alternative that I'd tend to pick for this passage is to keep the index finger as a semi-barree on the fifth fret the whole time (damping the D and higher strings) and fingering the E-octave with middle and pinky, then the D-octave with index and ring finger. This way you not only get good muting but also avoid needing to slide the entire hand between the two chords.
Those are octaves, it's a common technique. Either you mute the in-between string with one of your left-hand fingers so that the D string doesn't sound, or you don't use a pick and finger only the sounding strings with your right hand. One way to do the muting is to tilt the A string finger so that it touches the D string and doesn't let it vibrate.
The objective is to play the notes on the A and G strings, which means there's a string in between, in the way.
One way is to mute the string in between with a finger that's not being used. It simply touches that string, without pressing it down, so it makes a dull click, and that's it.
Or, as I prefer, play the strings using either a pick and an spare finger or just two fingers. That way, it's pretty straightforward to pick out the strings needed, and ignore any intervening strings.
Worth a little look at Mr. Thumb - who played octaves better than most of us play single notes! Reference Wes Montgomery.