Question: [![This is the problem](https://i.stack.imgur.com/UaVxr.png)](https://i.stack.imgur.com/UaVxr.png)

I'm not sure how they found the B matrix for this problem. I have no idea what they did since I keep getting 2,0,0 for the first column and that's already wrong.

Answer: 
Using the fact that $\sqrt{1+x}=1+\frac x{1+\sqrt{1+x}}$, we get
$$
\begin{align}
\sqrt{1+x}
&=1+\cfrac x{2+\cfrac x{2+\cfrac x{2+\cfrac x{2+\cdots}}}}
\end{align}
$$
Which gives the approximants
$$
\begin{align}
\color{#C00000}{1+\frac12x}&=1+\frac12x\\
\color{#00A000}{\frac{1+\frac34x}{1+\frac14x}}&=1+\frac12x-\frac18x^2+\frac1{32}x^3-\frac1{128}x^4+O\left(x^5\right)\\
\color{#5555FF}{\frac{1+x+\frac18x^2}{1+\frac12x}}&=1+\frac12x-\frac18x^2+\frac1{16}x^3-\frac1{32}x^4+O\left(x^5\right)\\
\color{#C0A000}{\frac{1+\frac54x+\frac5{16}x^2}{1+\frac34x+\frac1{16}x^2}}&=1+\frac12x-\frac18x^2+\frac1{16}x^3-\frac5{128}x^4+O\left(x^5\right)\\
\sqrt{1+x}&=1+\frac12x-\frac18x^2+\frac1{16}x^3-\frac5{128}x^4+O\left(x^5\right)
\end{align}
$$
[![enter image description here](https://i.stack.imgur.com/EC0A0.png)](https://i.stack.imgur.com/EC0A0.png)
Without referring explicitly to Pade approximants, let's try with the simplest case - i.e. two linear terms i.e. let $p = ax+b, \quad q = cx+d$, then our condition is $g(x) = p(x) - \sqrt{1+x} \cdot q(x) $ should have the first three terms zero.

Setting $g(0) = g'(0) = g''(0)=0$ gives $b = d = \frac43a, \; c = \frac13a$, so we have 
$$\sqrt{1+x} \approx \frac{x+\frac43}{\frac13x+\frac43} = \frac{3x+4}{x+4}$$
satisfying the required condition. 

The graph below of $\color{blue} {\sqrt{1+x}}$ and $\color {red} {p/q}$ should show you how surprisingly accurate (like continued fractions) this gets.

[![enter image description here](https://i.stack.imgur.com/6xq8a.png)](https://i.stack.imgur.com/6xq8a.png)