Prove that $\det(I-CD)=\det(I-DC) $ 
Let $C$ and $D$ be matrices such that $DC$ and $CD$ are square matrices of the same dimension. How can one prove that  $\det(I-CD)=\det(I-DC)$?

This is my approach to the question. I am not sure whether it is a correct one.

Let $ x $ be the eigenvalue of the matrix CD with the eigenvector $\textbf{v}$. Then $CD\textbf{v}=x\textbf{v}$. Now let $\textbf{y} = D\textbf{v}$. Then $ DC\textbf{y}=DCD\textbf{v}=xD\textbf{v} =x\textbf{y}$. This shows that $\textbf{y}$ is the eigenvector of $DC$ with the eigenvalue $x$.
Now $DC\textbf{y}=xD\textbf{v}$ is non-zero if and only if $x$ and $D\textbf{v}$ are non-zero. This implies that $DC$ and $CD$ have the same non-zero eigenvalues, which also means that $\phi (CD, x)= \phi (DC, x) $ provided $x \neq 0$. Considering the case where $x=1$ we have the required results, because  $ \det(I -CD) =\phi (CD, 1)= \phi (DC, 1) = \det(I -DC)$.

 A: This is simply an instance of the Sylvester determinant theorem.  A proof via block matrices is given in the link.
Your approach, however, will certainly do.  In particular, note that $CD$ and $DC$ having the same non-zero eigenvalues means precisely that for $t \neq 0$, we have
$$
\det(tI - CD) = 0 \iff \det(tI - DC) = 0
$$
This (along with the observation that both polynomials are monic and of the same degree) is sufficient to deduce that the two characteristic polynomials are the same. From there, "plug in" $t = 1$.
A: If $C$ and $D$ are invertible observe that $$I-CD=C(C^{-1}-D)$$ and $$I-DC=(C^{-1}-D)C.$$ Then apply the rule $\det(AB)=\det(BA)$.
Then (as Omnom points out) you can use the fact that invertible $(n\times n)$-matrices are dense in the space of $(n\times n)$-matrices, and that $\det:\mathbb{R}^{n^2}\to\mathbb{R}$ is just a polynomial hence continuous.
A: I will comment on your attempt to prove rather then how to prove.

  
*
  
*Let $x$ be the eigenvalue of the matrix $CD$ with the eigenvector $v$. Then $CDv=xv$. Now let $y=Dv$. Then $DCy=DCDv=xDv=xy$. This shows that $y$ is the eigenvector of $DC$ with the eigenvalue $x$.
  

It does not show yet that $y$ is an eigenvector of $DC$, because by definition an eigenvector must be non-zero, however, you have not shown that $y\ne 0$, and as a matter of fact, it may happen that $y=0$, $x=0$, so no contradiction. You assume in what follows that $x\ne 0$, but it is too late. It should be done earlier. For example,

  
*
  
*Assume that $x\ne 0$ is an eigenvalue of $CD$, and $v$ is a corresponding eigenvector, i.e. $CDv=xv$. Now let $y=Dv$, then $DCy=DCDv=xDv=xy$.  Since by assumption $x\ne 0$ and $v\ne 0$ as an eigenvector, we have $Cy=CDv=xv\ne 0$, which implies $y\ne 0$. This shows that $y$ is the eigenvector of $DC$ with the eigenvalue $x$.
  

Now about the second part of the proof. 


  
*This implies that $DC$ and $CD$ have the same non-zero eigenvalues
  

Let's see if you can really say that. All you have proved so far is that if $x\ne 0$ is an eigenvalue of $CD$ then $x$ is an eigenvalue of $DC$. For example, it can still happen that $CD$ has eigenvalues $0,1,1,1$ and $DC$ has $0,1,2,3$, no contradiction. To rule it out you need to remark that


  
*Exchanging the roles of $C$ and $D$ we can conclude from above that the non-zero eigenvalues of $CD$ and $DC$ are the same.
  

Can we say now the following?


  
*... which also means that $\phi(CD,x)=\phi(DC,x)$ provided $x\ne 0$.
  

First of all, you need to define what $\phi$ is. I guess that you mean the characteristic polynomials.
So can we say that it is true? Why the following situation is not possible that the eigenvalues of $CD$ are $0,1,1,1$ and the eigenvalues of $DC$ are $0,0,0,1$? It is not obvious. The argument above does not say anything about the multiplicities of the non-zero eigenvalues, so the conclusion about the polynomials being the same is too early. Honestly, I do not see a simple trick to save the argument without appealing to heavier machinery. What is possible to do is
a) show that the eigenvalues can be made simple by an arbitrary small perturbations in $C$ and $D$ and use the continuity of determinant argument (but on this way we could assume from the beginning that, for example, $D$ is invertible and have a much easier proof: the matrices $DC$ and $CD$ are similar  as $D(CD)D^{-1}=DC$).
b) count multiplicities for all generalized eigenvalues (Jordan normal form? does not sound simple).
c) something very different from your approach (eigenvalues), like using the properties of determinant, e.g. Sylvester theorem.
