The OP shows two alternative circuits.
The one on the left is a supply side connection, as the bus wires in the panel are service conductors. As long as supply side connections are allowed by your POCO and AHJ, it is compliant as drawn.
The one on the right would be a load side connection, but would require rewiring the existing main panel as a subpanel, separating neutrals from EGCs. Since the backfed breaker is at the opposite end of the bus from the OCPD protected feed, the opposite-end condition is met.