Your task, your mistake
You needed help and asked Mike who genuinely provided what he thought what was best for a task assigned to you. A good question you might ask yourself : what good can come out of blaming Mike?
In my opinion, badmouthing Mike to your boss might only give a poor image of yourself.
As you said yourself, John 'hasn't the best tact or patience', then him being upset is not something you should feel miserable for. Thus, no big deal of who should take the blame.
Take action so that it does not happen again
Not knowing exactly how to proceed, you asked your senior coworker what was the best pratice.
He genuinely provided what he thought was a good solution, yet John was not happy with the action you undertook.
Now, depending on wether you can find some documentation explaining how to deal with said task,
I would tell John something along the lines of :
Hey John,
Sorry again for my mistake about task X.
Do you know where I could find documentation about how to handle it properly next time?
If John answers that you should ask Mike, only then you can tell him that you did exactly this, not to blame Mike, but to explain that some updates about how to proceed are required because both you and Mike are unsure about this.
I would then tell John that you are going to set up a written procedure according to how John expects the task to be handled so that it doesn't happen again.
EDIT :
How could I face the same situation better, without blaming Mike?
- Make an apology to John for your mistake;
- Explain you were unsure about how to procede and did what appeared to you as the best solution;
- ask him in case of doubt who should be asked for help (him, Mike, or somebody else?).
EDIT2 :
Considering
I covered
Mike and I apologize for the mistake, saying that I did it without
being sure. that made me look really bad because it seems that I
didn't ask anybody when I had doubts, it looked that I am not a team
player
I would then focus more on
My mistake here was that I didn't tell my boss this but instead I
talked to my senior coworker Mike
When facing an upset John, I would say
I am really sorry John.
When you tasked me on X, I soon realised I
had doubts on how to proceed. Instead of speaking them up to you, I went to see Mike who kindly advised me to do
XYZ.
My fault, next time if any doubt I will ask you , if that's okay with you.
That way you admit your own mistakes (not asking straight for help to John) and still prove your course of action was senseful nonetheless.
One should not badmouth coworkers as it can come back to bite you ; however, if it appears that Mike is duly expected by John to know the correct procedure and made a mistake, that's on him.
To smoothen things a bit, I would put emphaze on something like
we could use updates about how to proceed
so that you do not put blame on Mike, but ask for ways to improve for both of you.