[tex]\mathsf{We\;know\;that : Density = \frac{Mass\;of\;the\;Object}{Volume\;of\;the\;Object}}[/tex]
[tex]\mathsf{Given : Mass\;of\;the\;Object = 20\;Grams}[/tex]
[tex]\mathsf{Given : Volume\;of\;the\;Object = 3.5\;cm^3}[/tex]
[tex]\mathsf{\implies Density = \frac{20}{3.5}(\frac{g}{cm^3})}[/tex]
[tex]\mathsf{\implies Density = 5.71\;(\frac{g}{cm^3})}[/tex]