That is one of the standard ways of writing wind instruments within a classical orchestra score.
Traditionally, wind instruments in the classical-age orchestra are paired, and, depending on the edition, single notes with single stems could be considered in two ways with the following convention:
- played by the first part if no specification is given in the whole piece (or its premise/introduction);
- played by both only whenever "a 2" (from Italian "a due", as in "both two players") is written;
In well written, explicit parts, unison notes are written with both up and down stems whenever the note has to be played by both musicians.
It's also up to the conductor, as always, to decide whether an explicitly written (or unspecified) "solo" part should be played by both musicisians.
In this specific case, without any further context, I'd say that the first B has probably to be played by both trumpeters, but you should better look for any indication in the beginning of the piece, the conductor's score or even the traditional performing practice (if it exists, otherwise ask to the composer/arranger/copyst/fellow player/conductor/teacher).