Leave the math to Pidge was a bad line and Keith didn’t really comfort Lance at all in that scene- he amplified some of his insecurities
Hold on, I actually have a lot of thoughts on that scene!!
So we all know Keith isn't the kind of guy that uses his words too generously - he much prefers action, and often has trouble connecting and communicating with people using words alone.
This means that Keith can only do so much when it comes to comfort. But even knowing this, Lance chooses to come to Keith. He could have easily gone to fake Shiro for help - he's back now, after all - but for whatever reason, Lance decided on Keith instead.
And the fact that he did that clearly meant something, so Keith is now in unfamiliar territory. Immediately we can see from his body language that he's kind of defensive and at a loss for what to say.
"I mean, you're the leader now, right?"
When Lance mentions the whole leadership thing, Keith's mood immediately dips, and this is really what sets up the rest of the interaction. He realises that this is yet another job that he has to do as the leader, and that he can't mess it up. He's gotta figure out what to say and do to help Lance out, and it's not just a chat between friends - it's a discussion between a team leader and his second in command, something really real and kind of intimidating. For Keith, that's a lot of pressure, especially since he's never been good with this sort of thing.
He starts off by kind of just agreeing with whatever Lance is saying, because at this point he's not really sure what Lance wants from him and how he should provide it, and is just trying to focus on not messing up.
But that only serves to bring Lance's mood down too, and causes him to think that his self-deprecating train of thought makes sense and is right.
And when Lance mentions stepping down, Keith has a genuine moment of shock, and his reaction was unplanned and unfiltered, and may not have come out the way he would have wanted it to.
It's at this point that Lance starts talking to Keith about the seriousness of their situation, and it's kind of scary to Keith, because he knows that Lance stepping down is the last thing they need, but Lance is just talking about it in such a frank manner, as if that's just the obvious logical next step in the situation.
That's why Keith just went for the "stop worrying" approach.
He couldn't handle hearing Lance telling him all of this stuff. And there's something about the "just focus on your missions" line that sounds like it's been echoed, like something Keith has heard Shiro say. I genuinely think Keith doesn't know what he's doing here, and just starts saying stuff he assumes will make him sound like Shiro - like the leader he should be.
This is probably the very moment that Keith cemented his decision to join the Blade. After all, Keith expresses himself better through actions than he does through words. In his head, he's thinking that he needs to fix this - fix the problem of there being one paladin too many. And he thinks he knows the best way to do this, although he doesn't voice it.
But of course, the things that Keith did voice, were not what Lance needed to hear at all.
Look at the way Lance recoils, his face falling, when Keith tells him to stop worrying. By saying all this, it seems like Keith is dismissing Lance's doubts and worries as stupid and irrelevant, and the last thing Lance wants is to be seen as dumb.
But to his credit Keith does seem to pick up on this. And that's why he calls Lance back just before he leaves. He doesn't want Lance to leave in low spirits. He wanted to make him feel better, he just didn't know how. So, Keith finally drops the leader act for a second. To try and get some familiarity, he leaves Lance with a playful joke, as per their usual interactions, but it's a lot softer than their normal jabs. The line could easily have been said in a more derisive, scornful manner, but the tone and expression that Keith used made it clear what his intentions were.
And god, it was an awful line. Terrible. Keith definitely just said the first thing that came to his mind, and probably regretted it as soon as the words left his mouth. But Lance understood. He knows what Keith means, and he understands that Keith really tried his best and truly wanted to cheer him up. And for the time being, that was enough.
I do, however, think that this absolutely shouldn't have been the extent to which Lance's insecurities were addressed. This is barely anything in terms of helping him overcome them - it feels more like they're touching on something that will be delved into deeper later - but vld screwed that up along with everything else sdjfkdk