No matter, whether this is a troll post or not. I don't understand, what you have against this (admittedly not very well posed) problem. It's all correct.
Usually, in introductory HEP class, and nuclear physics without HEP is not on top of research nowadays, one starts with stating the conservation laws for charge-like quantum numbers. The deeper real understanding comes of course only when you treat it within relativistic QFT and the Standard Model of elementary particles, but that's not the point here. Here it's simply asked about the quantum numbers of some hadrons.
The formulae given are correct. When restricting yourself to the three lightest quarks (up, down, and strange), the relation the hypercharge is indeed given by
Y=B+S,
where B is the baryon number and S the strangeness number. The hypercharge is conserved under strong interactions (but not under weak interactions). In terms of constituent-quark numbers of the naive parton model the baryon number is related to the "quark content" by B=(Number of quarks - Number of antiquarks)/3. E.g., a proton is made of 2 up and 1 down quark and no antiquarks, leading to B=1 for the proton.
I must be isospin (the usual naming is T_3, i.e., it's the three-component of isospin but that are conventions). The electric charge is then indeed given by Q/e=Y/2+I. E.g. the proton has isospin 1/2 and hypercharge 1, leading to a charge number of 1 as it must be (a neutron belonging to the same isospin dublett has isospin -1/2 and hypercharge 1 and thus Q=0 as it must be).
I don't know, how you are supposed to solve this exercise, i.e., what you are allowed to use. I'd suggest to look up the quark content of the particles and obtain the quantum numbers from it. You just need to know
u and d quarks build an isospin (isospin meant in relation to the strong interactions in the SU(3) constituent quark model aka the "eightold way") doublet with I=1/2 and I=-1/2, respectively. Both have strangeness S=0 and hypercharges Y=1/3. This leads to Q/e=(I+Y/2)=2/3 and -1/3, respectively, as it must be. Both have baryon number 1/3.
The s quark has isospin I=0 and strangeness S=-1 and hypercharge Y=-2/3. The charge is thus Q/e=-1/3 and baryon number B=1/3.
Why the quarks have these quantum numbers can only be understood from SU(3) group and representation theory. A good starting point is the Wikipedia article
http://en.wikipedia.org/wiki/Quark_model