Yet another way of cleaning coffee/tea stains could be to use a denture cleaner, one of those tablets that fizz if thrown into some water. I personally really like this, as it's simple, safe, and can be used not only for mugs for also for e.g. thermos bottles or reusable plastic/glass bottles with a much narrower opening.
Just boil some water, fill the mug with it while it's still boiling hot, set it in a sink just in case it overflows with fizzing, and drop in one or two tablets, then leave overnight. If the mug/bottle doesn't overflow/is done overflowing, you can use an oven mitt to carefully take it out of the sink and place it somewhere safe if you need to use the sink.
The next day you can usually just dump out the water and rinse once or twice, but I tend to do this more regularly, so I've never quite had a buildup like in your picture. In your case you might have to repeat, in which case you might not just want to rinse but also use a cloth or brush to see if you can remove more.