Let $f:[a, b]\to\mathbb{R}$ be twice differentiable, satisfy $f(x)=f'(x)+f''(x)$ for each $x\in[a,b]$ and $f(a)=f(b)=0$. 
Question: 4. Let $f:[a, b]\to\mathbb{R}$ be twice differentiable, satisfy $f(x)=f'(x)+f''(x)$ for each $x\in[a,b]$ and $f(a)=f(b)=0$. Find all such function $f$. 

My solution: It is given that $f(x)=f'(x)+f''(x), \forall x\in[a,b]$ and $f(a)=f(b)=0$. Observe that $f(x)\equiv 0$ is surely a solution. 
Claim: $f(x)\equiv 0$ is the only solution. 
Proof: For the sake of contradiction let us assume that there exists a function $f$ such that it is not identically equal to $0$ and satisfies all the conditions of the problem. Now given this and since we have $f(a)=f(b)=0$, we are sure that there are at least two roots of $f$ in $[a,b]$. This helps us in concluding that $\exists p,q\in[a,b]$, such that $p<q$, $f(p)=f(q)=0$ and $f(x)\neq 0,\forall x\in(p,q).$ 
WLOG, let us assume that $f(x)>0, \forall x\in(p,q).$ Now since $f$ is continuous on $[p,q]$, thus by Extreme value theorem $f$ must attain a maximum and minimum value in $[p,q]$. Now it is trivial to observe that the minimum value of $f(x)$ in $[p,q]$ is $0$ and the maximum value is some positive real number $M$ attained at some point $c\in(p,q)$. Now since $f$ is differentiable at $c$ we must have $f'(c)=0$. Thus we have $f(c)=f'(c)+f''(c)=f''(c).$ Now since $c\in(p,q)\implies f(c)>0\implies f''(c)>0.$ Now since $f''(c)>0$, thus by double-derivative test we can conclude that $f$ attains a local minimum at $x=c$, which is a clear contradiction. 
Thus there does not exist a function $f$ such that it is not identically equal to $0$ and satisfies all the conditions of the problem. Hence the only solution to the problem is $f(x)\equiv 0$.  
Is this solution correct? And is there a better solution than this?
 A: You can apply your argument directly on $[a, b]$ instead of applying it on $[p, q] $. Let $f$ take some positive value in $(a, b) $ and then $f$ attains maximum at $c\in(a, b) $ with $f(c) >0,f'(c)=0,f''(c)>0$ and then $c$ is a strict local minimum. Contradiction! Done!! I wonder why you thought of getting to $p, q$.

Your solution as it stands is fully rigorous even though the existence of $p, q$ is not justified in detail. Their existence follows by continuity of $f$. +1 for coming up with the solution on your own. 
A: In the present case the ODE is solvable, you get $f(x)=Ae^{-\phi x}+Be^{x/\phi}=e^{-\phi x}(A+Be^{kx})$, in fact we do not really care for the real values of roots, just that they are real.
Since exponential is positive we need to annulate twice $A+Be^{kx}$ which is not 
possible by convexity unless $A=B=0$.

I kind of follow your proof but like Thorgott, I find the conclusion of first paragraph a bit too direct. 
Maybe something like, $f$ continuous and $f\neq 0$ so there exist an interval $I\subset (a,b)$ such that $f\neq 0$ on $I$ and now take $\begin{cases}p=\sup\{x\le\inf I\mid f(x)=0\}\\q=\inf\{x\ge\sup I\mid f(x)=0\}\end{cases}$ 
So that it is clear you just "extend" $I$ to the biggest open interval on which $f$ is of constant sign.
The second paragraph is ok.
