The pen is half the price of the pencil, so it's 8 * 0.5 = $<<8*0.5=4>>4.
So both the pen and the pencil cost Maria 8 + 4 = $<<8+4=12>>12.
#### 12