Is it right to derive social marginal benefit by adding individual prices instead of quantities?

I come across a lecture material on market functions and externalities that makes me quite confused. Here's the setup: Two stores are located next to each other. If one installs a camera system in front of the shop to provide security supervision then it will cover both stores (hence both will be benefited).

The willingness-to-pay functions of these stores for that camera system look like this:

The question is to draw the social marginal benefit function $$(SMB)$$ of adopting the camera. This is how it is done:

What it does is to add vertically the prices for each level of quantity. Hence for the first part where $$P_{WTP2} \ge 0$$, $$SMB=WTP1+WTP2$$. Then after that point $$SMB=WTP1$$.

What I usually do and see for deriving total demand is to add up quantities for each level of price. Is it because now they are WTP and SMB functions that it's done the other way around?

• Welcome to the site. Could you please edit your question to clarify a couple of points? 1. Are the stores selling the same or different goods? 2. What is the relevance of the camera system? – Adam Bailey Nov 5 '18 at 10:11
• @AdamBailey Thanks for your comments. I think what the stores sell is unnecessary as we are looking at their demand (or here WTP literally), not supply. The camera system is what they demand. I make a few update to clarify this. – NonSleeper Nov 5 '18 at 16:05