Let's denote the number of hours worked as \( h \).
Leila's total money after \( h \) hours:
- Her hourly wage is $4, so after working \( h \) hours, she will have earned \( 4h \) dollars.
- Starting with $30 in her savings, her total amount of money after \( h \) hours would be: \[ \text{Leila's total} = 30 + 4h \]
Mark's total money after \( h \) hours:
- His hourly wage is $5, so after working \( h \) hours, he will have earned \( 5h \) dollars.
- Starting with $5 in his savings, his total amount of money after \( h \) hours would be: \[ \text{Mark's total} = 5 + 5h \]
To find when they have the same amount of money, we can set their total amounts equal to each other: \[ 30 + 4h = 5 + 5h \]
Now, we can solve for \( h \):
- Rearranging the equation: \[ 30 - 5 = 5h - 4h \] \[ 25 = h \]
Therefore, after 25 hours, Leila and Mark will have the same amount of money.