How can Poisson's equation be true when $\phi$ or $\vec A$ is time dependent? In electrostatic case, the charge density and potential at a point is related by:
$\nabla ^2 \phi = -\frac{\rho}{\epsilon_0}$
The same is true for the Magnetic potential $\vec A$ and current density $\vec j$ in magnetostatics.
But in Feynman lectures vol 2, it is mentioned that the equation $\nabla ^2 \psi=-s$ is true for general cases where $\psi$ can be $\phi$ or $\vec A$ and $s$ can be $\frac{\rho}{\epsilon_0}$ or $\frac{\vec j}{\epsilon_0 c^2}$ and time dependent.
Feynman gives an example of Coulomb
potential and I think by analogy with it he says that following the same kind of mathematics Poisson's equation is also valid for $\psi$ and $s$ where $s$ is actually time dependent.
How can this be true? Poisson's equations are only valid for static cases but how can they be valid for the general time varying case?
Also the solution to this equation is stated as $\psi (1,t) =\int \frac{s(2,t-r_{12}/c)}{4\pi r_{12}}dV_2$. How did the book reach into this solution?
The chapter is
https://www.feynmanlectures.caltech.edu/II_21.html
 A: I'm not sure that's exactly what Feynman was saying, but please correct me if I'm wrong. It seems to me that he was impressing the importance of Poisson's Equation, saying that we have a ready algorithm to compute the general solution for any physical system that satisfies it by converting a differential equation to an integral over all space.
That being said, there is a way to have Poisson's Equation satisfied even in the time-dependent, using Gauge Invariance. If we have time-varying electric and magnetic fields, then the divergence and curl of the electric field are:
\begin{equation*}
\begin{aligned}
\mathbf{\nabla}\cdot \mathbf{E} &= \frac{\rho}{\epsilon_0}\\
\mathbf{\nabla}\times \mathbf{E} &= - \frac{\partial \mathbf{B}}{\partial t}.
\end{aligned}
\end{equation*}
If we write this in terms of the potentials, you can easily show that this means:
$$\mathbf{E} = - \mathbf{\nabla}\phi - \frac{\partial \mathbf{A}}{\partial t},$$
and substituting this into the divergence equation, we have
$$\mathbf{\nabla}^2 \phi = - \frac{\rho}{\epsilon_0} - \frac{\partial}{\partial t} \left( \mathbf{\nabla}\cdot\mathbf{A}\right),$$
which is certainly not Poisson's Equation. However, if we use the Coulomb Gauge (i.e. if we choose -- as we are allowed to -- a vector potential $\mathbf{A}$ such that $\mathbf{\nabla \cdot A} = 0$), then the above equation just reduces to Poisson's Equation
$$\mathbf{\nabla}^2 \phi = - \frac{\rho}{\epsilon_0}.$$
In other words, in the Coulomb Gauge, one can find the electric scalar potential for the time-varying case in exactly the same was as you would find it for the static case. The solutions will be the same, as they satisfy the same equation.
However, since we have already chosen the gauge, it's easy enough to show that $\mathbf{A}$ will not in general satisfy Poisson's Equation. In fact
$$\mathbf{\nabla^2 A} = -\mu_0 \mathbf{j} + \frac{1}{c^2} \frac{\partial}{\partial t}\left( \mathbf{\nabla}\phi - \frac{1}{c}\frac{\partial \mathbf{A}}{\partial t}\right)$$
Of course, alternatively, we could have chosen another gauge such that $\mathbf{A}$ satisfies Poisson's Equation, but if we did that, you can show that $\phi$ wouldn't. In other words, you can make either $\phi$ or $\mathbf{A}$ satisfy Poisson's Equation, but not both of them, which should be pretty obvious, since there has to be some difference between static electromagnetism and electrodynamics!
A: Feynman arrives to two equations of this kind for the potentials
\begin{equation}
\label{Eq:II:21:7}
\nabla^2\psi(\vec{r},t)-\frac{1}{c^2}\,\frac{\partial^2\psi(\vec{r},t)}{\partial t^2}=
-s(\vec{r},t),
\end{equation}
one for $\phi$ and one for $\vec{A}$. These are wave equations, which appear almost everywhere in physics and are one of the most studied partial differential equations. The general solution consists of the general solution of the homogeneous equation (setting $s=0$) plus a particular solution of the inhomogeneous one. A particular solution is known to be
\begin{equation}
\label{Eq:II:21:14}
\psi(1,t)=\int\frac{s(2,t-r_{12}/c)}{4\pi r_{12}}\,dV_2.
\end{equation}
This is called a retarded potential, because the potential at position $1$ is not the one caused by the source distribution $s(\vec{r},t)$ all over space at time $t$, because that would imply an infinite propagation speed. Rather, the potential at one point is due to all the information that arrives at that point at time $t$. When we look at point $2$ from point $1$, we don't see the source distribution at point $2$ as it is now, but as it was a time $(r_{12}/c)$ ago. Notice this is the time that it would take for an electromagnectic wave to travel from point $2$ to $1$.
To derive this solution in a mathematically rigorous way one needs to make use of Green functions and it would make such a long post. You can take a look for example here to learn about Green functions and then see it applied here to obtain the retarded potentials. If what you want is a formal derivation I think this is mainly what you need.
Notice that Feynman doesn't give a formal derivation of this in the lecture that you mention, maybe because it was intended for an undergraduate audience. All that he does between Eq. $(21.7)$ where he writes the wave equation until Eq. $(21.14)$ where he gives the solution, is to try to give a reasonable sketch of the proof. He first makes a choice of a particular situation when he says

Suppose we have the spherical wave of Eq. $(21.9)$ and look at what is happening for very small $r$.

Then he claims in Eq. $(21.11)$ that $\nabla^2\psi=-s\quad(r\to0)$ (for very small $r$, not in general!) and then goes on to highlight the main point of the derivation, which is that

The only effect of the term $\partial^2\psi/\partial t^2$ in Eq. $(21.7)$ is to introduce the retardation $(t−r/c)$ in the Coulomb-like potential.

This is what I explained before with different words. Finally he jumps to the general case by summing up (integrating) all the contributions from different pieces of source. Feynman had a lot of physical intuition.
If you still think Feynman said $\nabla^2\psi=-s$ is true in general, take a look at this other chapter of his lectures. In particular, at the last table (table 15-1) he puts in the first column things which are FALSE IN GENERAL (true only for statics) and in the second column thigs which are TRUE ALWAYS.
