Number of ways in which a batsman can score 14 runs in 6 balls not scoring more than 4 runs in any ball.

If they’re the $6$ balls of a single over, and we’re talking about one batsman, either he scores nothing but $0,2$, and $4$, or he scores $3$ twice and $4$ twice, with the other batsman taking strike twice and scoring an odd number of runs each time. I suspect, though, that you’re intended to assume that the same batsman receives all $6$ balls, and that that $6$ balls are not necessarily consecutive.

You can solve it as a stars and bars problem, though you’ll have to use an inclusion-exclusion argument to take into account the limitation that he never scores better than a $4$. Specifically, if $x_k$ is his score on the $k$-th ball, you want the number of solutions of

$$x_1+x_2+x_3+x_4+x_5+x_6=14\tag{1}$$

in non-negative integers, subject to the condition that each $x_k\le 4$. Ignoring that last restriction, the stars and bars computation (which is explained reasonably well at the link in case you’ve not seen it before) gives a total of

$$\binom{14+6-1}{6-1}=\binom{19}5\tag{2}$$

solutions in non-negative integers. However, some of these solutions aren’t wanted, because one or more of the scores is over $4$. How many have $x_1\ge 5$? If we replace $x_1$ by $y_1=x_1-5$, every solution in non-negative integers to

$$y_1+x_2+x_3+x_4+x_5+x_6=9\tag{3}$$

corresponds to a solution of $(1)$ in non-negative integers with $x_1\ge 5$. The stars and bars calculation yields a total of

$$\binom{9+6-1}{6-1}=\binom{14}5$$

solutions in non-negative integers to $(3)$, so we should subtract them from $(1)$. Moreover, the same thing can happen with each of the other five scores, so we should reduce $(2)$ to

$$\binom{19}5-6\binom{14}5\;.\tag{4}$$

Unfortunately, any solution to $(1)$ that had two scores over $4$ has been removed twice in $(4)$ and should be added back in once.

Suppose that $x_1$ and $x_2$ are both over $4$; then we can replace $x_1$ by $y_1=x_1-5$ and $x_2$ by $y_2=x_2-5$ and count the non-negative solutions to

$$y_1+y_2+x_3+x_4+x_5+x_6=4\;.$$

The same calculation that we’ve already made twice tells us that there are

$$\binom{4+6-1}{6-1}=\binom95$$

of them. There are $\binom62$ pairs of scores, so we have to add $\binom95$ back in $\binom62$ times, getting

$$\binom{19}5-6\binom{14}5+\binom62\binom95\;.\tag{5}$$

And this is as far as we need to go, since it’s impossible to have more than two scores over $4$ and a total score of $14$: $(5)$ is the desired number.