To find after how many hours the amount of candy produced by both machines will be the same, we need to set the equations \( f(x) \) and \( g(x) \) equal to each other.
The equations are:
- \( f(x) = 15x + 90 \)
- \( g(x) = 30x + 30 \)
Set them equal: \[ 15x + 90 = 30x + 30 \]
Now, we will solve for \( x \):
- Subtract \( 15x \) from both sides: \[ 90 = 30x - 15x + 30 \]
This simplifies to: \[ 90 = 15x + 30 \]
-
Next, subtract 30 from both sides: \[ 90 - 30 = 15x \] \[ 60 = 15x \]
-
Finally, divide both sides by 15: \[ x = \frac{60}{15} \] \[ x = 4 \]
Thus, after 4 hours, the amount of candy produced by both machines will be the same.
The answer is \( \boxed{4} \).