The cable that is damaged is a gear cable. not the brake cable. Your picture does not show enough of the bike to tell why this happened, but it could be incorrect cable routing. The best investment you could make on your bike is to take it in for a tuneup. Assembling a bike you receive in a box is a bit more involved than you might think, most bikes require a fair bit of adjustment during assembly