This question is an exact duplicate of:
How to find the net electric force exerted on rod 2 by rod 1, both being on the x-axis, both having the same length and constant linear charge density, being some distance apart?
More specifically, if rod 1 is on the x-axis from $-L$ to $L$ and rod 2 is on the x-axis from $L+x$ to $3L+x$, and both have the same lambda linear charge density, what is the net force of rod 1 on rod 2?
I understand that the electric field created by the first rod is not uniform over the space occupied by the second rod.
I know $F=qE$, where $F$ and $E$ are vectors, and the electric field for continuous charge distribution formula.
However, I don't know how to proceed with solving this problem using this information. In particular, there are two position vectors that vary (identify positions with different electric fields, not one point), instead of 1 as usual. Please help by identifying the strategy and starting point to solve this problem. I drew a diagram and wrote down the equations but further than this I've failed to go. Thank you for your help.