If the answer for the first problem is $n$, then the answer for the second is $n^2$. This is because for every ordered pair $(p,q)$ of paths that work for the first problem, the path that we get by first doing $p$, then reversing $q$, gives a solution to the second problem. Conversely, any path from the top of the second configuration to the bottom produces an ordered pair $(p,q)$ of paths for the first problem. So there is indeed a bijection from the set of ordered pairs of paths for the first problem and all paths for the second problem.
Now for the first problem, it is probably worthwhile to think in general terms (so $k$ instead of $5$). We will not do that, just begin to deal with the concrete problem. Since $5$ is a pretty small number, we can just list the paths and count. It is useful to do this systematically.
If we start in top row, leftmost square, we can only go down, so there is $1$ path from there.
If we start in top row, the second leftmost square, at some time we will have to take a diagonal step, and then we have to keep going down. A look at the picture shows that there are $4$ places to take the diagonal step, and hence $4$ paths.
If we start in top row, third leftmost square, things are more complicated. We can take an immediate diagonal step, and then by the previous kind of analysis there are $3$ ways to finish. Or we can do down, and take a diagonal step. There are then $2$ ways to finish. Or we can go down, down, giving $1$ way to finish, for a total of $6$ paths.
If we start in top row, fourth leftmost square, we can take an immediate diagonal step, and then there are by the previous analysis $2$ ways to finish. Or else we can go down, giving $1$ way to finish, for a total of $3$.
Finally, if we start in the rightmost square of the top row, there is only $1$ path.
Add up.