In general, suppose x= A.BCCCCC... where "A" is the entire number before the decimal point, "B" is any decimals before repetition, and "C" is the repeating block. Also let "n" be the number of decimal places in B, "m" the number of decimal places in C.
In your example, 0.7777777..., A= 0, B= 0 (and so n= 0) and C= 7 (and so m= 1).
If x= A.BCCCCC... then [itex]10^nx= AB.CCCC...[/itex] and [itex]10^{n+m}= ABC.CCCCC...[/itex]. Subtracting, [itex](10^{n+m}- 10^n})x= ABC- AB[/itex] Where "ABC- AB" is now an integer. (Note that "ABC" does NOT mean "A times B time C" here!).
In your example, n=0 and m= 1 so [itex]10^{n+m}- 10^n= 10^1- 10^0= 10- 1= 9[/itex] and "ABC" is 7 while AB is 0: 9x= 7. Again, what is x?
(Yes, it is NOT 77/100 because that would be 0.7700000...)
Here's another example: write 423.923425252525... where "25" is the repeating section. The "non-repeating" decimal part is "9234" which has 4 decimal places. Multiply both sides of x= 423.923425252525... by [itex]10^4= 10000[/itex] gives 10000x= 4239234.25252525...[/itex]. The repeating part, "25", has two decimal places so multiply that by [itex]10^2= 100[/itex], which would be the same as multiplying the original equation by [itex]10^{4+2}= 10^6= 1000000[/itex], gives [itex]1000000x= 42393425.252525...[/itex]
Now subract those two: [itex]1000000x- 10000x= 990000x= 42393425.252525...-4239234.25252525...= 38154191[/itex]. Finally, then, x= 38154191/990000. Reduce that fraction if possible.
Note that the "repeating" was essential there. If that "25" did not continue repeating, the two decimal parts would not be the same and we could not cancel them.