First-passage times for random walks with nonidentically distributed increments