The first one is a play on the phrase 'I'm going bananas' to mean going a bit crazy. (Sounds a bit like a Tim Vine one-liner this). It is meant to make you think they are going crazy when you read the first three words, but then when you read the rest, you realise you misunderstood (due to the lack of punctuation) and that the person is actually saying to their bananas, that they are going.
I'm going bananas
"I'm going, bananas" is what I tell my bananas before I leave the house
This is a joke best delivered verbally. If done with the right timing, (pausing after the first bananas) it's makes the audience think they are saying that they are going crazy, then when you finish the sentence it's clear that you're not - you fooled them into thinking you were saying one thing, but said another.
In the second one, a solid refers to both a 'favour' and 'poo'.
When you eat a lot of grapes, you tend to have softer poos, hence why it is difficult to do a 'solid' and would be annoying (and more difficult) if a friend asked you to do them a solid.
Here the person telling this is purposefully misconstruing what their friend is asking them to do.