In the oil-water model, how to calculate the resultant force in the Z-direction of an inserted particle and oil and water respectively
Two comments to this:
a) this seems to be more a question on understanding simulations in general as it is about LAMMPS. thus you need to discuss this with your adviser/supervisor/tutor/colleagues. they know what your research project is.
b) your description is far too generic, unspecific, and somewhat confusing to be able to provide and specific help.
the normal approach is that you first need an understanding what an MD code computes and what of that information you will have to collect/extract (see a)) and then you need to provide a very simple example and demonstration of what it is that you want to do, what you have tried, and where exactly you are failing to get what you expect or are looking for. to give an example: a possible answer to your question that is similarly vague would be “just look at the z-component of the total force of your inserted atom” which is not really helpful (or is it by accident?)
The rule of the thumb is: the more specific a question and with more details and explanations of what the purpose of the step is, the better is the help going to be.