We will use the formula of Ohm's Law, which states that the current through a conductor between two points is directly proportional to the voltage across the two points.
where
V is the voltage
R is the resistance
I is the current
In our case we have
V=12 V
I= 2 A
we need to find the resistance, so we need to isolate the R in the formula
Then we substitute the values
therefore
the resistance of a circuit in which a 12-volt battery produces a current of 2 amps be 6 ohms.