First, I didn’t read all of the previous answer (^^), but 0.05 is most definitely not “the middle of a p value”. You should ignore that, at the very least.
I’m going to skip past a lot of important information about how hypothesis testing works, so that I don’t spend all day here, but you should review this stuff, because you can’t really function without it.
But okay, let’s get to the nuts and bolts. Your p value is one value you can use to determine whether or not you will reject the null hypothesis (i.e., it helps you answer the question “Was there an effect?”). A very typical value for determining statistical significance is p < 0.05.
To determine whether your value is extreme or not, you can either compare your p value to 0.05 (or another specified p value) OR you can compare your statistic to the cutoff value for the distribution.
You have shown us a calculated statistic (41.14), and a cutoff value (3.841) on the X2 distribution, which looks like this. The X2 distribution goes from 0 to infinity, and always has this general shape. Important: 3.841 is not a p value here. It lies on the X2 distribution.
If you picture both of these numbers on the X2 distribution, your calculated statistic (41.14) falls far to the right of the cutoff value, so it is an extreme value, and you can reject your null hypothesis, and conclude that there was an effect.
So, why does the example conclude p < 0.05? Have a look at this table. These are critical values of the X2 distribution. They are all the possible cutoff values, varying with 1) the df and 2) what the cutoff p value is. The df is provided in brackets in your formula (df = 1), so read along the top line to find that the cutoff X2 value is 3.841 when the cutoff p value is 0.05. Your value is more extreme than 41.14, therefore p < 0.05. The null hypothesis is rejected.
You should be able to use this table to figure out the p value from your cutoff value, and also to figure out your cutoff value given a specific p value and df. So, for example, you could have been given a significance level of 0.05 and a df value of 4, and then you’d have to compare your calculated statistic to <checks table> 9.488 to decide whether your calculated statistic was extreme.
I hope this helps!