The system with impulse response hi(t) is known as the matched filter for the signal Xi(t) because the impulse response is tuned to xi(t) in order to produce the maximum output signal. My intuition says for y(4) to be maximum,x(t)=h(-t+4). But I can not come up with a more rational mathematical proof.Can anyone help me with this
You are on the right track, so here is a hint:
Since these are all binary functions with time step of one (and I'm too lazy to type integrals), I'm just going to treat it like a sum with the index being the end-time. So you get
$$y(4) = h(1)\cdot x(4) + h(2)\cdot x(3) + h(3)\cdot x(2) + h(4)\cdot x(1) $$
Given that both $|h| \le 1$ and $|x| \le 1$ it should be pretty obvious what's the largest that $y(4)$ can be and what you need to do to each individual term to get the max result.
Caveat: I'm using very sloppy notation here, so please don't use that in your solution.