How do I barre these two strings?

no matter how I place my finger, I either barre other strings kind of muting them or twist my finger so it hurts. I’ve got no idea how I should place my fingers so could anyone show me how I can play it?

no matter how I place my finger, I either barre other strings kind of muting them or twist my finger so it hurts. I’ve got no idea how I should place my fingers so could anyone show me how I can play it?