In your first example I don't quite understand how the one can repeat if the 6 is after it, so I'll do the second one and hopefully you can use the method to figure out the first.

Let

Then

So, by subtraction, we have (notice how the repeating cancels itself out when we subtract, this is very important)

So the fraction you want is

It so happens that this is the same method used to prove that . Can you prove this as well?