Question: how to write 12 year old?
Answer: The correct way is '12-year-old girl'. You might also want to pay attention to an exception to this rule. Rule 3 states that when the modifying phrase is used after the noun, you don't hyphenate it.