I can understand your mentality.
To solve numericals of system of particles, you need to be first good with the concept of defnite integrals which is only taught in class 12.
So, normally people starts doing these problems after studying the defnite integral topic. Kindly try that and let me know if you face any problem after that. Thank you.