How to protect my own ideas/solutions when another of my supervisor's students is studying the same thing?
Teamwork
It's rather common for teams to work on "the same thing" research wise - on a single project, shared research and (most importantly) collaborating and sharing ideas, not hiding them from each other. That is a good thing.
It may be dependent on the field, but I'd guess that having such teamwork is far more common than a "two person" team of a supervisor and a single student.
The attribution of a particular idea within a single team isn't that important - doing the work in implementing and verifying that idea is almost all of created value in a research project. Simply coming up with an idea for possible work and nothing else generally justifies a mention in acknowledgements, not even a co-authorship. Since there are more valid research ideas than time to work on them properly (and this is true even if a student needs two months of literature review to pick one suited for him/her), it is rather expected for advisors to spread interesting research ideas around - it often takes years and multiple attempts to do a particular idea properly, and treating it as "taboo" because someone else is working on it would be rather counterproductive.
If you have two or more people working on a single sufficiently large problem, that's great - you will inevitably specialize to certain parts of that problem and depending on how you (or your supervisor) organize the work, you can co-author the resulting publications or split the results in smaller pieces to publish separately; but you will go further beyond the other researchers in the same subfield than if you were struggling at it alone.
Just because you are a grad student, and your advisor is an established researcher, does not mean:
that you do not have the right be be supported in a positive way by your advisor
that your project, that you came up with, and defined, and started to work on, should be assigned to another student
that you should have to pussy-foot around protecting your small, medium-sized, and big steps towards your thesis from your own groupmates and your advisor, for god's sake
that you do not have the right to assert yourself with your advisor
In my opinion, if you want to continue to work on this topic, with this advisor, and hold onto your self-respect, you have an obligation to yourself to assert yourself with him or her.
I'm not saying it will necessarily be easy (although you may be in for a pleasant surprise -- you never know!). I'm just saying it has to be done.
If you want to, you could talk over the problem with your dean of graduate studies in your department first.
It is precisely the imbalance of power between you and your advisor that makes what s/he did (giving your topic to another student) appear so questionable.
Let's hope s/he did it out of thoughtlessness, or in the belief that the topic can somehow be subdivided neatly enough into two theses that the two of you can continue without being in competition with each other. (If the latter case -- I hope it is true.)
However, I suggest you start thinking about a possible different advisor, just in case.