These two questions/statements are addressing different aspects of the pension tax system.
The general principle is that you should be able to have pension contributions be tax-free up to the £40k limit (or less for very high earners).
If your employer makes the contribution, they do so before you are even charged income tax, so the contributions are automatically tax-free.
If you make the contribution, tax relief needs to be claimed to ensure that the end result is that the contributions are tax-free. The pension scheme claims the basic-rate relief and adds it to the amount you send them. If you pay higher-rate tax then you use self-assessment to get the higher-rate part of the relief which goes back in your pocket.
So you need to add up all contributions that go into the pension scheme - yours including the basic rate tax relief, and the employers' - to figure out the £40k limit. But only your contributions go into self-assessment for the purpose of getting higher-rate relief.