The top one is Baltic 634, the bottom one BT684.
As you can see they had 2000ft seperation. That's 600m for us europeans not accustomed to aviation.
Furthermore, at 17:40:19 BT634 reported in at 52.409599,16.981899. 17:40:25 BT684 reported in at 52.423222,17.019314. While those are 6 seconds apart, the planes were north-eastern course at the time, so I guesstimate that they had 1-2km horizontal seperation as well.
As to why - they're going the same place. The separation is big enough that there's almost certainly no benefit to it.