Mass number is just (no. of protons) + (no. of neutrons) don't mind. mass number will be given in questions.
Atomic number is the number of protons or number of electrons. There is no other way. You have to mug them up.
You have to know which group an atom belongs to, to find the valency. Each group has its own common valency.