Let the fraction be \( \frac{x}{y} \), where \( x \) is the numerator and \( y \) is the denominator.
We are given two conditions:
1. When 1 is subtracted from the numerator, the fraction becomes \( \frac{1}{3} \):
\[
\frac{x-1}{y} = \frac{1}{3}.
\]
2. When 8 is added to the denominator, the fraction becomes \( \frac{1}{4} \):
\[
\frac{x}{y+8} = \frac{1}{4}.
\]
Now, solve these two equations:
From the first equation:
\[
\frac{x-1}{y} = \frac{1}{3} \implies x - 1 = \frac{y}{3} \implies x = \frac{y}{3} + 1.
\]
From the second equation:
\[
\frac{x}{y+8} = \frac{1}{4} \implies x = \frac{y+8}{4}.
\]
Now, equate the two expressions for \( x \):
\[
\frac{y}{3} + 1 = \frac{y+8}{4}.
\]
Multiply both sides by 12 to eliminate the denominators:
\[
4y + 12 = 3(y + 8).
\]
Simplifying:
\[
4y + 12 = 3y + 24 \implies 4y - 3y = 24 - 12 \implies y = 12.
\]
Now substitute \( y = 12 \) into the equation \( x = \frac{y}{3} + 1 \):
\[
x = \frac{12}{3} + 1 = 4 + 1 = 5.
\]
Thus, the fraction is:
\[
\frac{x}{y} = \frac{5}{12}.
\]
Conclusion:
The fraction is \( \frac{5}{12} \).