Adapting arguments and plagiarism
What you describe seems to me to be a normal mode of mathematical progress, and I would urge you simply to carry on! Ride that train as far as you can.
It often happens that someone's mathematical results can be improved or generalized in various ways, and when this is possible, it is mathematically desirable that the generalization be undertaken well.
You may be worried that the value of this work is less than some other totally original work. If the generalizations are routine, then indeed that may be true. But from what you say, this doesn't seem to be your case. Many generalizations are not routine and such work is definitely worth doing.
Finally, let me caution you to guard yourself against a certain mistake that sometimes undermines motivation for a young researcher. Namely, it often happens in mathematical research that we begin in a state of terrible confusion about a topic; as research progresses, things only gradually become clarified. After hard work, we finally begin to understand what is the actual question we should be asking; and then, after fitful starts and retreats, we gain some hard-won insight; until finally, after laborious investigation, we have the answer.
But alas — it is at this point that the crippling illness strikes. Namely, because the researcher now understands the problem and its solution so well, he or she begins to lose sight of the value of the very solution that was made. The mathematical advance begins to seem trivial or obvious, perhaps without value. Having solved the problem so well, the mathematician becomes a victim of his or her own success. Because all is now so clear, it is harder to appreciate the value of the achievement that was made.
Please guard against this disease! Do not denigrate your achievement simply because it seems easy after you have made it. In many mathematical realms, the actual achievement in research is that certain issues and ideas become easy to understand. Please look upon the ease of the answer at the end as part of the achievement itself, and think back to the initial state of confusion at the beginning of the work to realize the value of what you have done.
So please carry on and ride that railroad as far as it will take you.
One major aim of a PhD is to study a problem so intently that suddenly, after much hard work and perseverance, the solution becomes obvious - or at least that it becomes obvious what the approaches to the problem would be and why one of these approaches is likely to be superior to the other approaches. Be aware that everyone has good ideas - and groundbreaking approaches tend to build on earlier approaches. My PhD was "simply" the combination of three existing approaches in a novel way. But to get to the point where it was obvious that these three things together were what was necessary or would produce a solution took 2 1/2 years' work.