Let the cost of a pen be \( p \) and the cost of a pencil be \( q \).
Given conditions:
\[ 2p + 3q = 86 \quad \text{(Equation 1)} \]
\[ 4p + q = 112 \quad \text{(Equation 2)} \]
Step 1: Multiply Equation 2 by 3:
\[ 3(4p + q) = 3(112) \]
\[ 12p + 3q = 336 \]
Step 2: Subtract Equation 1 from this result:
\[ (12p + 3q) - (2p + 3q) = 336 - 86 \]
\[ 10p = 250 \]
Step 3: Solve for \( p \):
\[ p = \frac{250}{10} = 25 \]
Thus, the cost of a pen is Rs. 25.