*Answer:* (a) No; (b) No.
a. The difference and the sum of two integers have equal parity, likewise are an integer and its absolute value of equal parity. Thus Mari's every step keeps the parity of the sum of all numbers on the blackboard unchanged. Among 1,2,…,2021, there are 1011 odd numbers. As 1011 is odd itself, the sum of all numbers 1,2,…,2021 is odd. This implies that the sum of all integers from 1 to 2021 that contain 4 and the sum of integers from 1 to 2021 that do not contain 4 have different parities. Hence the set of all natural numbers from 1 to 2021 that contain 4 can never appear on the blackboard.
b. Let there be a positive integers from 1 to 10000 that do not contain 4. Then there are 10000−a positive integers from 1 to 10000 that contain 4. As each Mari's step decreases the number of numbers on the blackboard by 1, she should make a−(10000−a) or, equivalently, 2a−10000 steps to reach the desired state. As only one new number can appear at each step, introducing 10000−a new numbers assumes 2a−10000≥10000−a which is equivalent to a≥320000. But there are only 94 numbers among the first 10000 positive integers that do not contain 4; since 94=6561<320000, achieving the desired state is impossible.