The blue lead is connected from the GNDA_ADC connection to the GND pin of the TMP36 temperature sensor. The red lead is connected from pin 3 of the other connector (3.3V) to the positive supply pin of the TMP36 and the orange lead to pin P9.40. Note that only certain pins can be used as analog inputs (see http://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/adc)
The pins are numbered left to right, 1, 2 then on the next row down 3,4 etc. You can find out about all the pins available on the P8 and P9 connecters down each side of the BBB here: http://stuffwemade.net/hwio/beaglebone-pin-reference/