If you say $O$ is zero and $S(x)$ is a function that gives you the successor of $x$, then $S(O)$ is one, $S(S(O))$ is two, etc.
Now, if you want to compute the predecessor of $x$, say $P(x)$, then, you can do it by creating a list which consumes the $S$ in an expression like $S(S(S(....)))$, until you have $S(O)$.
For example 3-1:
You start with three: $S(S(S(O)))$, and you build this list:
$$\begin{pmatrix} S(S(S(O))) & S(S(O)) \\ O & S(O)\end{pmatrix}$$
You have $S(O)$ on the right lower part of the list, so you have your answer, two, in the right upper part of the list.
Now, with multiplication, the idea is that the algorithm behind $a \times b$ when $a,b$ are natural numbers: $a,b \in \mathbb N$ is the following:
$a$ and $b$ are of the form $S(S(S(...)))$. For example $a=3=S(S(S(O)))$ and $b=2=S(S(O))$.
If you apply $b$ to $a$ by replacing all $S$ in $a$ by the $S$ in $B$, you get: $a \times b=S(S(S(S(S(S(O))))))=6$
Now, if $b=0=O$, you do the same thing, you replace all $S$ in $a$ by $b$ and you obtain $a \times O = O$.