What is a viable build for Teemo vs. Teemo?
I recently had trouble against an opposing Teemo. What build would work best to counter another Teemo?
Well, to actually answer your question...
In a Teemo vs Teemo matchup, you MUST build AP. AD will come out ahead in a fight for the first couple of levels but after that AP is far superior (I'm talking this particular matchup).
Build high flat AP items asap. You can't rely on autos with blinding dart. You mainly focus on poking with higher damage from your blind and don't directly fight unless you will win the longer battle for sure.
If you are vs an AP teemo, start of Chalice so you can spam your Q quicker. If you are vs an AD teemo, you can start of Zhonya's and/or chalice since teemo still does sufficient magic damage. At some point from here you will want to get a Lliandry's and Rabadon's. Also, somewhere in there mix in Sorc boots.
From this point on, you should focus your build mostly around what you need for the rest of the enemy team.
When it comes to a mirror matchup between two Teemos, the biggest problem is that you cannot know what the enemy Teemo plays in champion select (and unless you are playing a custom game you won't even know that there is an enemy Teemo). So you have to start with the runes.
Teemo is a rather aggressive laner and you should also try to play aggressive against an enemy Teemo. Since you usually don't know that you play against another Teemo you should take a mix of early aggression runes and a little bit of defense just to be safe in general. I recommend Hybrid-Penetration red (Good for early aggression and you don't drop off late), Armor yellow (almost always take these), Magic resist blue (Teemo does mainly magic damage) and AP Quints (For more damage) of which all are non-scaling. With these runes you are safe for a general matchup and against a Teemo, but if you know that you are playing against a Teemo you can also switch the armor for health. Note that these runes are for AP/Hybrid Teemo only. For masteries just go for a standard 21/9/0 skill tree. You can also play AD Teemo with a standard AD Carry rune page but I don't recommend playing it since Teemo scales too well with AP to be played as AD. Also you will most likely lose to an AP Teemo as AD Teemo.
When it comes to the Item build you should stick to your current playstyle (AP or AD). Just go a normal starting item either Dorans Blade if you are playing ad or Dorans Ring/Boots if you are playing AP. Boots can be really helpful since it makes chasing a lot easier if the enemy doesn't buy them first and you also will get 4 Healing potions which help a lot versus an harrassing lane opponent.
What you build next depends entirely on who dominates the lane. If you can dominate try to keep it up and go for an aggressive build. Buy a Haunting Guise next if you are AP, a Bilgewater Cutlass if you are AD or a Wits End if you are hybrid. Note however that you will have to keep the pressure up if you buy the aggressive Items.
If you are behind however you should focus on a more passive playstyle and you have to try to get back in the game through farm (if needed under the turret). You will need to buy damage (you will be useless otherwise) but you will also have to keep an eye on defensive stats. That means go for a Hexdrinker if you are AD, for a Chalice/Abyssal Scepter if you are AP or again for a Wits end if you are Hybrid. You can basically always build magic resistance against a Teemo since his strength lies in his early base damage which is purely AP. Once you lose to an AD teemo due to a lack of armor you definitely have lost your lane and it will be hard to regain an advantage over him without the help of your teammates or without him doing something incredibly stupid.