How do transistors have three legs when there are two circuits going through?
You mis-identified what a transistor is.

The transistor is one component in that circuit that you referenced.  The symbol for an NPN transistor is:



Look closely and you will see one of these in there.

Each of the "squiggly" components is a resistor.  You posted a circuit consisting of 2 resistors and 1 transistor.