Have I embarassed my supervisors by solving a problem that a PhD student in my group was working on without success? I'm a bachelor student in mathematics writing my thesis at a small university in the US. A PhD student that has the same supervisor has spent a very significant amount of time working exclusively on a theorem which he hasn't been able to prove, so the supervisor offered me a thesis on the topic. No one was really expecting me to make any real progress, but everyone was very nice and enthusiastic.

It turned out that I was able to prove the theorem essentially straight away using a different approach to what they've tried. After this happened I've felt a distinct change in attitude towards me. There is no excitement, there is no discussion on how to strengthen or generalize the result and I generally get the feeling that they are pretty embarrassed about the whole situation.

The PhD student has a severe lack of publications and is probably feeling quite stressed because further progress on this problem seems unlikely. So what is my best plan of action here? Keep in mind that stepping on toes is the last thing I want to do given that I was hoping to pursue a PhD in this very department. How do I act diplomatically while at the same time making sure I get due credit for my achievements? Is it possible they will try to bully me out of first-authorship to protect the reputation of the PhD student?
First, if you haven't already, I suggest you have a discussion with your advisor about what to do with the result.  Is it worth writing up?  Is it worth trying to publish or try to go further?  If so, you should write it up and make sure there are no errors, and hopefully your advisor will be willing to help check over this.


  Is it possible they will try to bully me out of first-authorship to protect the reputation of the PhD student?


Anything it possible, but nothing you have said gives any indication anyone else thinks they should be a co-author for this result, assuming it is publishable.  It's common in math that a problem seems difficult from one perspective, but is easy from another.  This can always be a little embarrassing, but usually it's no big deal if you're dealing with reasonable mathematicians.  However, it may mean (for a variety of possible reasons) that the problem is less interesting to them than originally thought, and this could be part of what you're sensing.  I've often gotten excited about discovering things, only to realize later that they weren't so novel, or been interested in problems because I thought my methods could solve them then lost interest when I found out other methods are much better.

Anyway, hopefully an open chat with your advisor about this will clear things up.  I would not mention the PhD student in this discussion, just focus on the questions in my first paragraph.

Edit: I forgot to say, your situation may indicate that this department might not be your best option for a PhD (there may be a trend of weak grad students or not-on-the-ball advisors).