Joseph's answer explains a lot of this already but I just want to give a much simpler answer in case others have the same question:
"Why is there two H over here? I thought it would be just H * Cnot?"
To put the $X$ matrix into the $H$ basis, simply calculate $H^{-1}XH$ as you can see here. Since $H^{-1} = H$, the expression is as given in the answer you found in that book :)
"Where from do we get these representations?"
In the basis containing $|0\rangle$ and $|1\rangle$, each of the 4 elements of the $X$ matrix will be given by $\langle 0| X |0\rangle$, $\langle 0| X |1\rangle$ , $\langle 1| X |0\rangle$, $\langle 1| X |1\rangle$ int he exact positions shown in the screenshot you gave us. If you do the matrix multiplication of a row vector, times a matrix, times a column vector (from left-to-right), combined with knowledge of how "Dirac notation works", you'll see why this is the case :).