I want to know the principle and theory of finding the distance
between galaxies
So let's start with this part. The simple answer is "all sorts of ways", but for what you're asking the historical development is what is important.
Astronomers face the problem of measuring the distance to any object they can't ever touch. One of the earlier effective methods was to measure the location of an object in the winter and summer, when the Earth is on opposite sides of the sun and you have the base of a triangle a couple of hundred million kilometers long. That's great for the planets and nearby stars, but stars and galaxies are so far away that it's not useful.
So for much of modern history, they've been looking for other methods, and most of these are based on the idea of a "standard candle". Let's say you had a candle and you measured exactly how much light it gave off. Now move that candle far away, measure the brightness, and the difference is due to the inverse square law so you can work backward to get the distance.
The key breakthrough was the discovery that Cepheid variables are standard candles - their absolute brightness is a function of how quickly they cycle (normally on the order of a few days). So by measuring the time it took to cycle, and then the brightness, you could work backward and measure their distance very accurately.
Until this method was discovered, there was a great debate on whether galaxies were nearby gas clouds or something very much further, "island universes" of their own. That debate ended when Edwin Hubble discovered Cepheids in other galaxies, and was able to clearly demonstrate they were a whole long way away.
Since then we've continued looking for these standard candles and added a couple of new ones. But first...
that rate of expansion of the universe
So now we have to look at this issue. As Hubble continued his measurement of Cepheids around the sky, he noticed something extremely interesting - everything was moving away from the Earth. And the speed was clearly dependant on the distance from Earth, which led to the Hubble constant.
Now at first, you might think this is a simple issue - if there was a big bang and everything is moving outward, sure, everything is moving away from you. But that requires you to be at the exact centre of the entire universe, and that definitely seems wrong.
So it became increasingly obvious over time that the movement we see is not due to everything moving away from Earth, but the universe itself expanding, so everything is moving away from everything. Here on Earth you see Andromeda moving away from you, along with everything else. But if you were in Andromeda you'd see everything moving away from that point, and you'd see precisely the same thing on a distant a quasar.
changing 5%-10% per 1000 million years
Which brings us here. Remember those standard candles? Well in the 1990s we found a new one, a particular type of supernova. These are bright enough that we can see them all the way across the universe. And when we do the same measurement, we notice they are further away than they would be strictly by Hubble's constant. And that means that, over longer times, the universe is expanding faster.
So basically we know this because we have a new type of measurement, and lots and lots and lots of measurements to make sure we are actually seeing what we think we are seeing.
The question then, is why are we seeing that? And that's an entirely different message.