If at point A with position $\vec{r}_A$ the sum of forces and moments is $\vec{F}$ and $\vec{M}_A$ then the force line of action has direction $$\vec{e} = \frac{\vec{F}}{|\vec{F}|}$$ and position closest to A as $$ \vec{r} = \vec{r}_A + \frac{ \vec{F} \times \vec{M}_A}{|\vec{F}|^2}$$
where × is the vector cross product.
This comes from the net moment $\vec{M} = \sum_{i=1}^n \vec{r}_i \times \vec{F}_i $ and the net force $\vec{F} = \sum_{i=1}^n \vec{F}_i$. By definition the line of action is located where $\vec{M} = \vec{r} \times \vec{F}$ and by crossing with the net force both sides gives
$$\begin{aligned}
\vec{F} \times \vec{M} & = \vec{F} \times ( \vec{r} \times \vec{F} ) \\
& = - \vec{F} \times ( \vec{F} \times \vec{r} ) \\
& = - \vec{F} (\vec{F}\cdot\vec{r}) + \vec{r} ( \vec{F}\cdot\vec{F} ) \end{aligned}$$
by using the vector triple product. Now since $\vec{r}$ is taken to be closest to the line of action, it means it points perpendicular to $\vec{F}$ and thus $\vec{r}\cdot\vec{F}=0$. So
$$ \vec{F}\times\vec{M} = \vec{r} (\vec{F}\cdot\vec{F}) $$
$$ \boxed{ \vec{r} =\frac{ \vec{F}\times\vec{M} }{ \vec{F}\cdot\vec{F} } }$$
Here we have
$$ \vec{F} = (P,0,-P) \\ \vec{M} = (0,P (a+c),-P b) $$ and $$\vec{r} = ( \frac{a+c}{2}, \frac{b}{2}, \frac{a+c}{2} ) $$
There is also a component of the net moment parallel to the net force. This is calculated with the pitch $$h = \frac{\vec{F}\cdot\vec{M}}{\vec{F}\cdot\vec{F}}$$ which in our case it is $h=\frac{b}{2}$. Together the net moment at the origin is
$$\begin{aligned} \vec{M} & = \vec{r} \times \vec{F} + h \vec{F} \\
& = ( \frac{a+c}{2}, \frac{b}{2}, \frac{a+c}{2} ) \times (P,0,-P) + \frac{b}{2} (P,0,-P) \\
& = (-P \frac{b}{2}, P (a+c), - P \frac{b}{2} ) + (P \frac{b}{2},0,P \frac{b}{2} ) \\
& = (0, P (a+c), -P b) \;\checkmark
\end{aligned}$$