Please see the solution video.
OpenStax College Physics for AP® Courses, Chapter 33, Problem 36 (Problems & Exercises)
This is College Physics Answers with Shaun Dychko. We are going to verify the quantum numbers for protons and neutrons based on the quantum numbers of their constituent quarks. So a proton has an up, up and down quark and each up quark has a baryon number of positive one-third and then the down quark also has a baryon number of positive one-third for a total of 1. And for the charge, each up quark has a charge of two-thirds of the elementary charge and then the down quark has a charge of negative one-third and this makes a total of positive 1. The total strangeness, electron family number, muon family number and tau family number are all 0 as we can see here. And then for the neutron, the baryon number is one-third for each of the quarks for a total of 1 and the charge is two-thirds of the up quark and then negative one-third and negative one-third for each of the down quarks for a total charge of 0. And also the total strangeness and and the total lepton numbers are all 0.