The reaction you are referring to is a somewhat complex one, involving several different chemical processes. Here is a simplified explanation.
References :
Potassium ferricyanide [K. ferricyanide / C
12Fe
2K
7N
12]
Sodium hydroxide [NaOH / HNaO]
Selegiline (C
13H
17N)
Water (H
2O)
Ammonia [NH
3 / H
3N]
Amphetamine (C
9H
13N)
Sodium borohydride [NaBH
4 / BH
4Na]
Sodium cyanoborohydride [NaBH
3CN / CBNNa]
Methamphetamine (C
10H
15N)
C
12Fe
2K
7N
12 is an oxidizer. When mixed with an alkaline solution of NaOH, the resulting mixture becomes even more reactive.
C
13H
17N is a monoamine oxidase inhibitor (MAOI) that is often used in the treatment of Parkinson's disease. It's structure contains a phenyl ring and an amine group. When reacting all of these together, the oxidizer reacts with the amine group of C
13H
17N causing it to lose a H atom and become an imine (C
13H
16N
2) (aka Schiff base).
C
13H
17N + C
12Fe
2K
7N
12/NaOH → C
13H
16N
2 + H
2O
The imine reacts with the C
12Fe
2K
7N
12 and NaOH to undergo a process called oxidative deamination. In this process, the imine loses an amine group, which is converted to NH
3.
C
13H
16N
2 + C
12Fe
2K
7N
12/NaOH → C
12H
15NO + NH
3
The resulting compound contains a phenyl ring and a ketone group (C
12H
15NO). At this point, the reaction can take one of two paths. The ketone group can either be reduced to an OH group, resulting in C
9H
13N:
C
12H
15NO + NaBH
4 → C
12H
16NO + NaOH
C
12H
16NO + NaOH → C
9H
13N + NaOH + H
2O
or it can undergo reductive amination, resulting in C
10H
15N.
C
12H
15NO + NH
3/NaBH
3CN + NaOH → C
10H
15N + H
2O
Interestingly under the right conditions both can be formed in a single reaction!