For the thermodynamics of trajectories, an ensemble containing the variables of dynamic activity and first-passage time (FPT) is considered. The dependence of the average FPT on the total nonnegative change in entropy is obtained. Depending on whether entropy flows into or out of the system, the average FPT increases or decreases as the total entropy change increases. The same dependences were obtained for the dispersions of dynamic activity and FPT, as well as for the correlation of dynamic activity and FPT.