3. The attempt at a solution
I believe this is a question from gravitational pressure, but I don't really understand how to solve problems on this concept. I know that you have to take an element of thickness dr at a distance r from the centre. And do something with that. But I don't understand anything about this concept. Please help?

Then you need to revise your course notes on gravitational pressure.
What causes it? What would you expect: would the pressure increase or decrease as you go towards the center? Why?
What would the amount of pressure depend on?

Then you need to revise your course notes on gravitational pressure.
What causes it? What would you expect: would the pressure increase or decrease as you go towards the center? Why?
What would the amount of pressure depend on?

What causes it? Gravitational force.
What would you expect: would the pressure increase or decrease as you go towards the centre? Increase.
Why? Because we're putting more mass on top of the elemental shell, so the pressure would increase.
What would the amount of pressure depend on? P=F/A = m(on top of it, kind of like in Gauss's law we only consider charge outside the Gaussian surface) / 4πs2 where s is the radius of the elemental shell we're considering.

Consider an element at radius s, r<s<R, thickness ds. What is the gravitational acceleration at radius s? What weight has the element? What does it add to the pressure at radius r?

What is the gravitational acceleration at radius s? Gravitational field is (GM/R3).s
What weight has the element? dm = ρ4πs2ds.
What does it add to the pressure at radius s? Since P=F/A = (dm)g/A = { ρ4πs2ds . GM/R3 . s } / 4πs2
P(due to all the mass on top) = GMρ/R3 ∫ sds (from s=s to s=R)
= GMρ/2R { 1-s2/R2 }