Let's call our gene in this case L (long hair) vs. l (short hair) and
B (black) vs. b (white).
You have one LLBB guinea pig (homozygous for both) mated to a llbb
guinea pig. You know that the short-haired, white guinea pig MUST be
homozygous for the recessive alleles (l and b) because otherwise it
would be long-haired and black.
So, the parents are LLBB and llbb.
The F1 generation (first children) will ALL be heterozygous for both
genes - meaning they will be 100% LlBb, and 100% phenotypically
long-haired and black.
At this point the phenotypes and genotypes for the F2 (grandchildren)
are a standard Mendelian cross using two genes - which you can figure
out using a 4x4 table. Each parent can contribute four pairings of
alleles (LB, Lb, lB, or lb), making 16 possible genotype combinations
(number in parentheses is the statistical ratio that the pair will
LLBB (1/16) - long hair, black
LLBb (2/16) - long hair, black
LLbb (1/16) - long hair, white
LlBB (2/16) - long hair, black
LlBb (4/16) - long hair, black
Llbb (2/16) - long hair, white
llBB (1/16) - short hair, black
llBb (2/16) - short hair, black
llbb (1/16) - short hair, white
The ratios of phenotype are the standard for a heterozygous cross (9:3:3:1):
The links I gave you on a previous question are also applicable to
this one, so I refer you back to them. This is basic Mendelian
Genetics, and while complicated and a bit confusing, is really just
probability and statistics. Let me know if anything's not clear!