Let x be the number of pens bought
He bought 12+5x pencils
x+(12+5x)=108
6x+12=108
6x=96
x=<<16=16>>16 pens
#### 16