What is the correct intuition for time dilation? I'm a high school student and I recently thought of an intuitive, but incorrect way of thinking about time dilation. My trouble lies in understanding why this intuition does not work. It should be noted that I have not yet been formally taught special relativity. Here is my thought process:
Suppose we have two hypothetical observers, one on a spacecraft moving at 0.5c and another that is stationary outside of the vehicle. Now suppose the spacecraft turns on its headlights. Since the speed of light is measured to be the same for all reference frames, both observers measure one second to have passed when the light beam has moved about 300,000km relative to themselves. For the one outside, that occurs after one second in their frame of reference. However, the outside observer also sees the light beam to be only 150,000km ahead of the spacecraft after one second, which is still moving at 0.5c relative to them. Therefore, it takes two seconds for the light beam to 'pull ahead' of the vehicle by 300,000km. For the observer inside, this is when they measure one second to have passed, and therefore, they must measure time to be ticking half as fast as the observer outside does.
However, when I plug 0.5c into the time dilation formula, I find that the observer in the spacecraft does not measure one second to pass for every two seconds that pass for the observer outside. Instead, the one inside measures $\sqrt{3}$ seconds to pass for every two seconds the observer outside measures. Where did I go wrong with this intuition? Why does thinking about time dilation this way not work? What is the correct intuition I should use to better understand time dilation? I appreciate any help.
 A: Your attempt to work out time dilation on an intuitive basis is very laudable, but incorrect. I suggest that what you try next is to consider that the spacecraft turns on its headlights and its rear lights at the same moment. If you then try to re-apply your original reasoning to the new version of the experiment, you will find that it cannot possibly explain why the light from the front of the ship travels only 150,000 km in a second in the stationary frame, while also explaining how the light from the rear travels 450,000 km in the other direction in a second. If you ponder that for long enough, you should reach an understanding that time dilation is actually an effect caused by something we call the relativity of simultaneity. Best of luck with it!
A: In my opinion, it's better to reason with a position-vs-time graph (a spacetime diagram).
To start you off, below is one using the usual convention where t runs along the horizontal axis (although many relativity discussions use time t along the vertical axis).
https://www.desmos.com/calculator/c2mtuzt6ty

I was following you until...

Therefore, it takes two seconds for the light beam to 'pull ahead' of the vehicle by 300,000km.

In addition, it's not clear to me why you say

However, when I plug 0.5c into the time dilation formula, I find that the observer in the spacecraft does not measure one second to pass for every two seconds that pass for the observer outside.

In any case, I think it is best to draw a diagram to describe your scenario.
By the way, the arithmetic for calculations in relativity is easier if one chooses a relative velocities of $\frac{3}{5}c$ or $\frac{4}{5}c$, which lead to right triangles with pythagorean triples. (This does not happen for $\frac{1}{2}c$ or $0.99c$.)
The mathematics of time-dilation is related to trigonometry with adjacent side of a right-triangle. This fact and a diagram often help guide my physical intuition.

By the way, one way to get the 8.660254 as the elapsed time along the spaceship worldline is by
$$\sqrt{(15)(5)}=10\left(\frac{\sqrt{3}}{2}\right)=8.660254...,$$
where $5$ and $15$ are "radar-times" from a radar measurement made by the lab. 
Note: $\Delta t=(15+5)/2=10$ and $\Delta x/c=(15-5)/2=5$ 
and thus $(\Delta t+\Delta x/c)=15$ and $(\Delta t-\Delta x/c)=5$
so that $(15)(5)=(\Delta t+\Delta x/c)(\Delta t-\Delta x/c)=
(\Delta t^2-(\Delta x/c)^2)=(10)^2-(5)^2
$.
