a) Adam and Eve take turns writing one number each until they have 20 numbers in a row. Adam writes the first number, and the only numbers they can use are 1, 2, 3, 4, and 5. Eve tries to ensure that the 20-digit number obtained is divisible by 9. Can Adam prevent it?
(b) The same task as above, but this time Adam and Eve write a 30-digit number.
EDIT: I know that : "A natural number is divisible by 9 iff its checksum is." But i do not know how to continue from that.
Following the hint of @donpartini, you can reduce the problem to summing integers in $S=\{1,2,3,4,5\}$ and considering the last value modulo $9$, i.e., observing numbers as values in $\mathbb{Z}/9$.
Let a round be a sequence of two turns, first by Adam and then by Eve. Suppose a round starts with a value $x\in\mathbb{Z}/9$, then Adam choses a value $a\in S$, followed by Eve chosing a value $e\in S$. The value is than updated to $$x_n = x+a+e \pmod 9. $$ Are there any values of $x_n$ that Eve can force, independently of the choice that Adam makes?
Yes, there is a single such value, and that is $x_n=x+6$. For any choice $a\in S$ of Adam, Eve can select $e=6-a\in S$, which forces $x_n = x + a + (6-a) = x + 6$.
Similarly, for any other choice of $y \in \mathbb{Z}/9\setminus\{x+6\}$, Adam can choose a move that prevents Eve from reaching $y$.
For $y\in(x+1,x+2,x+3,x+4,x+5,x+7,x+8,x)$, Adam will choose $(1,2,3,4,5,1,2,3)$ accordingly. This move forces $x_n \not=y$ no matter the choice of Eve.
A simple example, if we have $x=1$, Adam can prevent Eve from reaching $y=8$ by choosing $a=1$, and then $x+a+e\not= 8$ for any choice of $e\in S$.
This allows us to solve the problem in the following way:
Assume after $20$ rounds the final value is $x_n=0$, i.e., Eve wins. In order to force this outcome, the previous round must have started with $x=3$ (by inverting the previous formula $x=x_n-6$). But in order to force this, the round before must have started with $x=6$, and the one before with $x=0$, and so on. In particular round $20-n$ must start with value $x=3+3n$. In particular this means that the game at round $1$ (i.e. the beginning of the game) must start with the value $x=3+57 = 6 \pmod 9$. However this game starts with an empty number to which digits are added, which in our terminology means that it starts with the value $x=0$. This means that Eve does not have a winning strategy, and Adam has a winning strategy. Adam will simply prevent Eve from reaching values $3+3n$ in round $n$ as explained above.
If the game lasted for $21$ rounds (or any number of rounds which is a multiple of $3$), then Eve would have a winning strategy. Her strategy would be to return $6-a$ for any play $a$ of Adam.