Does a Mach 1 plane hear a sonic boom from a Mach 3 plane overtaking him?
To answer the question:

Yes, and even more, both would be able to notice the sonic boom of the other aircraft.

Why

To understand why, you have to understand how sonic booms are created. 

Sound is nothing more than waves of different air pressure travelling through the air. Once released by an aircraft or other object, they start to propagate in all directions with the speed of sound in the resting air. (This means the waves do not travel faster than sound, even when the aircraft does!) If we mark e.g. the regions of high pressure, we get growing circles, the center of each being the point where it was created by the aircraft. 

If the aircraft is moving, the circles will not be concentric, like in this animation for an object traveling at half the speed of sound:



If the aircraft is moving with the speed of sound, the circles start to touch each other on a line perpendicular to the track of the aircraft, just where the aircraft is. This is not so clear on the next animation, as there are simply not (big) enough circles.
However, on this line, all the regions of high pressure sum up to a region of 'very high' pressure. This is the shock wave, which is often referred to as sound barrier. (The term also describes just the insurmountable speed limit encountered by non-supersonic aircraft.) If this shock wave passes an observer on the ground, he will hear a sonic boom.



As the aircraft accelerates more, the shock wave isn't perpendicular any more, instead, you get two lines. In reality (3D), you get a cone with the aircraft at the tip, and the opening angle is defined by the speed of the aircraft.



Now, to answer your question: As the tip of the cone is where the aircraft is, this cone travels with the aircraft, and with its speed. 

So, if an aircraft is overtaken by a supersonic aircraft, it will be overtaken by the cone-shaped shock wave of that aircraft a little bit later, too. Also, the faster aircraft will pass the shock wave of the slower aircraft.

Remarks


An aircraft itself is very loud, but also dampens every noise from outside, and headsets and helmets may contribute to the dampening, too. So, I don't know if a pilot would hear something from the boom. Maybe he does not, but the aircraft definitely crosses the shock wave.
My explanation does not describe where the sound comes from. While the sound of a subsonic aircraft mostly comes from the engines, it comes from the compression of air at the surfaces of supersonic aircraft.
This cone sometimes is visible, as on the following picture of an F18, stolen from air-attack.com. This is because the high pressure region is followed by a low pressure region, where air expands and moisture may condensate. The picture also shows that there are usually two shock waves, each where the cross section of the aircraft changes significantly.  One is generated near the canopy and one near the wings. EDIT: As commented by @PeterKämpf, this picture does NOT show an F18 at supersonic speed. It is at transsonic speed, which is close to, but still below mach 1. The fog forms due to other effects.




However, here is an other picture of a Northrop T-38 at mach 1.1, showing the shock waves, from wiki commons: