(If I'm correct, is this a question about "Esperanza Rising"?)
If so: Esperanza started panicking because while she was trying to escape into the night, in order to protect the women from the bandits and from Tio Luis, Esperanza was not able to say goodbye to her friend, Marisol, and the lack of space, (combined with the actual realization that she was leaving her home), in the wagon's secret compartment, caused Esperanza to panic.