The first verse in this discourse focuses on jhana as a crucial element in the path to release. The Buddha's "awakening to jhana" apparently refers to two points in his career as a bodhisatta: (1) the point when, realizing the futility of self-torture, he surmised that jhana might form the path to awakening; and (2) his realization of the extent to which jhana actually could lead to the knowledge that yielded in full awakening. (For details on both of these points, see MN 35.) In the second verse, the Buddha expands on Pañcalacanda's understanding of the practice of jhana by pointing out that it has to be endowed with mindfulness to be genuinely right concentration. This point is related to the fact that the various lists of activities constituting the path — such as the five faculties, the seven factors for awakening, and the noble eightfold path — always place right mindfulness before right concentration. It's also related to the statement in MN 44 that the four satipatthanas — establishings of mindfulness or frames of reference — form the nimitta, or theme, of right concentration.
AN 9.42 contains an explanation of the first verse here, in which Ven. Ananda identifies the first jhana as the opening offering escape from the confining place of sensual pleasures, and each successive level of jhana as the opening offering escape from the confining place of the preceeding jhana. Finally, he says, the cessation of perception & feeling acts as the ultimate opening offering escape from all forms of confinement.
At Savatthi. As he was standing to one side, Pañcalacanda the deva's son recited this verse in the Blessed One's presence:
[The Buddha:]
Even in a confining place they find it, [Pañcalacanda, said the Blessed One,] the Dhamma for the attainment of Unbinding. Those who have gained mindfulness are rightly well-centered. [2]See also: AN 9.42