Help getting my head around frames of reference in special relativity

OK, so my textbook says that in time dilation and length contraction, the proper time and the proper length is "That which is in the frame of reference of the observer at rest relative to the event".

This means that the proper time/length is that which is observed by the observer moving close to the speed of light, and the dilated time and contracted length is that which is observed by an observer moving relative to the event, i.e. is watching something move close to the speed of light. Am I correct so far?

So, for example, if we have a beam of protons moving with a velocity of 0.99c and a stationary electron watching them, the proper time/length is that which the protons observe whereas the dilated time/contracted length is that which the electrons would see.

Assuming I am correct so far (which I very well may not be, please tell me if I'm wrong), I have just been confused by an exam question. Here it is:

In an experiment, a beam of protons moving along a straight line at a constant speed of $1.8$x$10^8$$ms^{-1}$ took 95ns to travel between two detectors at a fixed distance $d_0$ apart. Calculate the distance $d_0$ between the two detectors in the frame of reference of the detectors.

Well, according to my understanding above, this would be the contracted distance, since the observer (detectors) are in motion relative to the event. However, they calculate the distance using $d=vt$, which would mean it's the proper distance.

Your explanation of proper/contracted time and distance is correct. The proper length of, say, a long rod is the length of that rod in a comoving reference frame. (That is, a reference frame from which the rod isn't moving at all.)

In this problem, there's two distinct reference frames: the frame of the protons and the frame of the detectors. The speed of the protons is provided relative to the detectors. (Note that relative to the protons themselves, the speed would be 0.) The time the beam takes to travel was presumably measured by the detectors, so it is also most likely in the reference frame of the detectors, albeit the question is arguably unclear on this point. Since we have a velocity and time in a single reference frame and want to find the distance in this same reference frame, we can simply use $d = vt$. Relativistic corrections are only required in cases when at least two of $d$, $v$, and $t$ are measured in a reference frames that are relatively moving.

First postulate of Special Relativity (AKA Principle of Relativity):

The laws by which the states of physical systems undergo change are not affected, whether these changes of state be referred to the one or the other of two systems of coordinates in uniform translatory motion. OR: The laws of physics are the same in all inertial frames of reference.

So, $d=vt$ is valid for all inertial reference frames, but remember not to mix different reference frames and events while using this formula (meaning, all variable data should be recorded in same reference frame and of same event).

For the exam question which confused you, here's two considerable reference frames: One, detector reference frame and another, proton reference frame.

Question is asking for distance in detector reference frame. So, you need to pick a speed and time interval (of distance traversal event) in detector reference frame. And, you have got data from question to calculate that.

In proton reference frame, detectors are moving (not protons itself). You can use same given data with some logic, but the formula $d=vt$ would give distance in proton reference frame.

The thing here is: Don't always forcefully try to apply length contraction and time dilation. Use it only when you compare data of two reference frames. Length and time intervals are relative quantities, so length contraction and time dilation require more than one reference frames. If there's only one reference frame involved, length contraction and time dilation are meaningless.

Local distance and time (as measured by the moving object) are marked with a prime ($x'$ and $t'$) according to Lorentz transforms.

Therefore $d = vt$ should denote distance and time as measured in the frame of reference of the detectors considered stationary.