The question I'm working on is, given a matrix $A = (a_{i,j})_{i,j = 1}^n$ and the polynomial \begin{gather*} P(x) : = \det\begin{bmatrix}a_{1,1} + x & a_{1,2} + x & ... & a_{1,n} + x\\a_{2,1} + x & a_{2,2} + x & ... & a_{2,n} + x\\ \vdots & \vdots & \ddots & \vdots \\ a_{n,1} + x & a_{n,2} + x & ... & a_{n,n} + x \end{bmatrix} \end{gather*} Express the coefficients of $P(x)$ in terms of $A$.
So far, using $n$-linearity of the determinant, I have found that \begin{gather*} P(x) = \det(A) + \begin{vmatrix}x & a_{1,2} &... & a_{1,n} \\x & a_{2,2} & ... & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ x & a_{n,2} & ... & a_{n,n} \end{vmatrix} + \begin{vmatrix}a_{1,1} & x & ... & a_{1,n}\\a_{2,1}& x & ... & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n,1} &x & ... & a_{n,n} \end{vmatrix} +...+ \begin{vmatrix}a_{1,1} & a_{1,2} & ... & x\\a_{2,1}& a_{2,2} & ... & x \\ \vdots & \vdots & \ddots & \vdots \\ a_{n,1} &a_{n,2} & ... & x \end{vmatrix}\\ = \det(A) + x \left(\begin{vmatrix}1 & a_{1,2} &... & a_{1,n} \\1 & a_{2,2} & ... & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & a_{n,2} & ... & a_{n,n} \end{vmatrix} + \begin{vmatrix}a_{1,1} & 1 & ... & a_{1,n}\\a_{2,1}& 1 & ... & a_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n,1} &1 & ... & a_{n,n} \end{vmatrix} +...+ \begin{vmatrix}a_{1,1} & a_{1,2} & ... & 1\\a_{2,1}& a_{2,2} & ... & 1 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n,1} &a_{n,2} & ... & 1 \end{vmatrix}\right) \end{gather*} However, I am not sure how to simplify this further. Is there a nice way to write this remaining coefficient of $x$ in terms of $A$, or should I approach this problem in a completely different way?