How to determine the number of hidden neurons from the structure of the data and their classes In this link : http://colah.github.io/posts/2014-03-NN-Manifolds-Topology/
Under the heading 'Topology and Classification', it has been said that at least 3 neurons are required in the hidden layer to successfully separate the classes of this data:

I do not understand why the number of neurons has to be 3. The visualization shows that a 3D space can successfully linearly separate the classes, but I do not understand how that 3D space is generated.
So, I have two questions.
1. How has the visualization been done using the hidden neurons and their weights(and why does it fail for 2 hidden neurons?)
2. Why does the number of neurons have to be 3, and how can that be determined by just looking at the 2D data from the dataset?
 A: There is one important piece of information missing in your question, but given in the referenced blog: The neurons have a sigmoid activation function ($\tanh$), implying that each neuron produces a linear boundary.
Now, from the definition of class $B$ you can simply ignore the part $d(x, 0) < 1$. It's a red herring, not relevant to the class boundary. It is, however, important that the class $A$ is $< 1/3$ from the center, and class $B$ $> 2/3$ from the center. The simplest class boundary, in terms of straight lines, is a equilateral triangle with a height of one:

You need a neuron for each line, $a$, $b$, and $c$, and each of them outputs $>0$ if the input is on the "in-side" (in the direction of the origin, looking from the line). In the next layer (output) you simply sum the results of the previous layer and threshold it, so that the output is positive only if all three produced a positive result. This is basically a logical "AND" on the three neurons.
So, to answer you first question: Each axis shows the (distance $\cdot$ direction) from the corresponding line (actually, in the 3D-visualisation one axis (left) goes in the opposite direction, but that doesn't matter, as you can simply multiply the weight leading from that neuron by -1. Just imagine the opposite sign on this axis, it simplifies the explanation). You can see that all points from class $A$ (red) are in the top-left edge, having positive distance $\le 1$, on each axis. For class $B$, i) the signed distances can be larger and than $1$ and ii) one of them always has a different sign than the other two.
Your second question: The number of neurons can be greater than 3, but not smaller. You need at least three neurons to fully enclose the class $A$, because triangle is the simplest closed shape in 2D.
