Functional derivative for the action $S$ From Lancaster and Blundell's Quantum Field Theory for the Gifted Amateur, p. 15:

Example 1.3
The Lagrangian $L$ can be written as a function of both position and velocity. Quite generally, one can think of it as depending on a generalized position coordinate $x(t)$ and its derivative $\dot{x}(t)$, called the velocity. Then the variation of $S$ with $x(t)$ is $\delta S/ \delta x(t)$ and can be written as
\begin{align}
\frac{\delta S}{\delta x(t)} &= \int \mathrm{d}u \left[\frac{\delta L}{\delta x(u)}\frac{\delta x(u)}{\delta x(t)} + \frac{\delta L}{\delta \dot{x}(u)}\frac{\delta \dot{x}(u)}{\delta x(t)}\right] \\
&= \int \mathrm{d}u \left[\frac{\delta L}{\delta x(u)}\delta(u-t) + \frac{\delta L}{\delta \dot{x}(u)}\frac{\mathrm{d}}{\mathrm{d}t}\delta(u-t)\right] \\
&= \frac{\delta L}{\delta x(t)} + \left[\delta(u-t) \frac{\delta L}{\delta \dot{x}(u)}\right]^{t_f}_{t_i} - \int \mathrm{d}u \,\delta(u-t) \frac{\mathrm{d}}{\mathrm{d}t}\frac{\delta L}{\delta \dot{x}(u)} \\
&= \frac{\delta L}{\delta x(t)} - \frac{\mathrm{d}}{\mathrm{d}t}\frac{\delta L}{\delta \dot{x}(t)}, \tag{1.27}
\end{align}

I have trouble understanding why
$$\frac{\delta x(u)}{\delta x(t)}=\delta(u-t), \frac{\delta \dot{x}(u)}{\delta x(t)}=\frac{d}{dt}\delta(u-t).$$
I learned how to take derivatives of functionals, but $x(u)$ is not a functional. I also read that $\delta x(u)$ is defined as
$$\delta x(u)=\epsilon\delta(u-t).$$
I'm guessing I have to take the fraction of $\delta x(u)/ \delta x(t)$, but what is $\delta x(t)$?
Also, the differentiation in $\delta \dot{x}(u) $ seems to have swapped with the $\delta$ sign, i.e. $\delta \dot{x}(u)=\frac{d}{dt}\delta x(u)$. What is happening here?
 A: While you are correct that $x(u)$ is not in principle a functional, it can be seen as one if we employ the Dirac delta to write
$$x(u) = \int \delta(u-v) x(v) \mathrm{d}v. \tag{1}$$
Now, if $F_x[f]$ is given by
$$F_t[f] = \int K(t,t') f(t') \mathrm{d}t',$$
we know that the functional derivative of $F_t$ with respect to $f$ is
$$\frac{\delta F_t}{\delta f(u)} = K(t,u).$$
Applying this expression to Eq. (1) leads us to
$$\frac{\delta x(u)}{\delta x(t)} = \delta(u-t).$$
As for the swapping of $\delta$ with $\frac{\mathrm{d}}{\mathrm{d}t}$, that is because the change in the function (associated with $\delta$) is assumed to occur in fixed instants of time, so that the two operations commute.
For further detail, I particularly recommend Lemos' Analytical Mechanics. Sec. 10.3 deals with functional derivatives and addresses the first part of your question, about how to differentiate $x(u)$ with respect to $x(t)$ (my approach in this answer is essentially taken from there). Secs. 2.1–2.2 deal with variational calculus and, in particular, the matter of why $\delta$ and $\frac{\mathrm{d}}{\mathrm{d}t}$ commute (see Eq. (2.37)).
