Answer:
36 grams mass will stretch the spring 12 centimeters.
Explanation:
Here, Distance of the spring ∝ The Mass attached
or D = k M ( for some arbitrary constant k )
Now, for m = 15 g, D = 5 centimeters
So, here 5 = k(15)
or,

⇒ For D= 12 cm , D = k M
⇒

or, M = 36 grams
Hence, 36 grams mass will stretch the spring 12 centimeters.