Let the numerator be A and the denominator be B.
So, the required fraction is $A/B$.
ATQ,
The sum of the numerator and denominator of the fraction is $12$.
$A+B=12$
⇒ $A+B–12=0$
ATQ,
If $3$ is added in the denominator, the fraction becomes $12$
Use this equation which is given in the question,
$A/(B+3)=1/2$
⇒ $2A=(B+3)$
⇒ $2A-B–3=0$
⇒ $2A–B=3$
Hence, two equations are,
$A+B–12=0$…… (a)
$2A–B-3=0$…….. (b)
Add (a) and (b), we will get
$A+B–12+(2A–B–3)=0$
⇒ $3A-15=0$
⇒ $3A=15$
⇒ $A=5$
Use the obtained value of $A=5$ in (a), and find B
$5+B–12=0$
$5+B=12$
⇒ $B=7$
Therefore, the fraction is $5/7$.