Help with basic inductor
The current direction in the diagram is from lower potential to higher potential but in applying the formula you have assumed the current to be from higher potential to lower. The formula becomes:

$$(0-2) = 2\times\frac{di}{dt}$$

Apply KVL in the direction of current you are assuming

In this particular question if you rig the circuit up, current will always from from higher potential to lower (2V-0V), hence it is opposite to the assumed direction and therefore negative.