a)
We claim that Miljen can play so that he leaves some odd number n and 2019−n ones on the board after each of his moves, i.e. before Rudi's move. In that case, after 1009 of Miljen's moves only the number 2019 is written on the board, so Rudi cannot make a move and Miljen wins.
In the beginning, the board can be described as above, with n=1. Rudi can erase two ones and write number 2 on the board. In that case, Miljen can erase n and 2, which he can do since n is odd, and write n+2 on the board, which leaves the board as described above.
In each subsequent turn, Rudi and Miljen can play as above and our claim holds. Alternatively, Rudi can erase n and one of the ones, and write n+1. Note that 2019−n is even, so Rudi's move leaves an odd number of ones on the board. Miljen can now select n+1 and a one, and write n+2, which again only leaves some odd number and ones on the board, as before.
b)
In this case, Miljen uses the same strategy as in a), except when making the final move. Namely, after each of Miljen's moves an odd number n and 2020−n ones are written on the board. Note that now 2020−n is odd. It remains to describe Miljen's last, i.e. his 1009th move.
If after Rudi's 1009th move the numbers on the board are 2018, 1 and 1, Miljen can erase the two ones, and replace them with 2. Rudi cannot make a move after that, since 2018 and 2 are not relatively prime, and Miljen wins.
If after Rudi's 1009th move the numbers on the board are 2017, 2 and 1, Miljen can erase 2017 and 1, and replace them with 2018, which again leaves Rudi with 2018 and 2, and Miljen wins.