Ratio and algebric problem  
To answer this question I have guessed that initial numbers of pen and pencil was x and y. So I wrote,
$$\frac{x+5}{y+3}= \frac{47}{17}$$
But what next? 
 A: Notice that there's an obvious solution to your equation, namely where $x=42, y=14$. Hold that thought.
With a bit of algebra, your equation becomes
$$
17x-47y=56
$$
So any solution will lie on the line 
$$
y=\left(\frac{17}{47}\right)x-\frac{56}{47}
$$
It's fairly clear from looking at the slope of this line that any point $(x,y)$ on the line will give another at $(x+47t, y+17t)$ so since we have one integer solution $(42,14)$ we'll have infinitely many others, namely those generated  by all integer values of $t$.
Now you're asked to compare the ratio $x/y$ with 3. Consider the line $y=(1/3)x$. That will intersect the other line at the point $(42, 14)$ so you'll have equality there. It's obvious from the graph of the two lines that any solution further out than $x=42$ will be below the line $y=(1/3)x$ so all those solutions will have ratios $x/y<3$. Thus, your guess was correct, namely that you don't have enough information to determine how the ratio $x/y$ of a solution compares with 3 (well, except to say that $x/y\le 3$ for integer solutions).
