ANSWER-
The sedimentary rocks came before the stream. The stream eroded and cut through the already existing sedimentary strata, exposing the layers on both sides of the stream bed. Over time, the stream may have deposited additional sediment on top of the strata, but the strata were already there prior to the formation of the stream.