This is a fairly straightforward question on the concepts of remainders.
When a positive integer is divided by 3, the smallest remainder you can get is 0 and the biggest remainder you can get is 2.
From statement I, when m is divided by 6, the remainder is 2. This means that m can be written as,
m = 6k + 2, where k is the quotient.
When m is divided by 3, 6k will be divisible fully, leaving a remainder of 2. This is a unique value for the remainder.
Statement I alone is sufficient. The possible answer options are A or D. Answer options B, C and E can be eliminated.
From statement II, when m is divided by 12, the remainder is 2. So, m can be written as,
m = 12k + 2, where k is the quotient.
When this m is divided by 3, 12k will be fully divisible, leaving a remainder of 2 again. This is a unique value for the remainder again.
Statement II alone is sufficient. Answer option A can be eliminated.
The correct answer option is D.
Hope this helps!