What to do when your idea turns out to be an old one
Push Idea A into a background section and push novel results elsewhere. There's no real need to explain why you include a background section, but you might like to mention where your presentation differs from the original and explain why.

I seem to be the first one to see that they could all be combined into a considerable collection of interesting results

That's (part of) the novelty your paper provides.

to what extent it is appropriate to mention that I stumbled upon the idea &quot;independently&quot; of the older paper.

You could mention this somewhere, but it isn't necessary. Your paper has changed direction, like many papers. There's no need to provide a history of such changes. (Unless they are particularly interesting to your story.)