Jeremy Barrier has clearly illustrated the relationship of the ActPl III, 5-6 with the Matthean beatitudes in a chart in his dissertation (p. 133). Inspired by Dr. Barrier, I’ve added colour: the red text indicate verbal resemblances with 1 Cor 6-7 (not to be confused with red-letter editions of the Bible); the blue text shows resemblances to the beatitudes in Matt 5.
Comparison of the Acts of Paul III, 5-6 with 1 Corinthians 6-7 and Matthew 5 (pdf)
What the chart shows is that there is a strong relationship of ActPl III, 5-6 with 1 Cor 6-7 and with the Matthean beatitudes of Jesus. In the case of 1 Cor, numerous strong verbal and thematic ties make it almost inescable that author of the beatitudes in the ActPl knows 1 Cor (see my dissertation, 171-173); in the case of Matt 5, knowledge of the gospel is likely, though it is not inconceivable that the beatitudes were known in oral form too.