According to the phenotypic percentages and ratios expressed by the offspring, we may say that one of the parents is SsBB. The other parent might be either SsBb or Ssbb.
Available data:
Two diallelic genes ⇒ S for hair length and B for colorS gene
⇒  S is the dominant allele and codes for short hair
⇒  s is the recessive allele and codes for long hair
B gene
⇒  B is the dominant allele and codes for black hair
⇒  b is the recessive allele and codes for white hair
N = 2518 short-haired, black offspring + 817 long-haired, black offspringN = 3335
We need to figure out which is the genotype of the parental generation.
A way to do it is by taking the percentages and ratios of the progeny. This is,
3335 individuals 100% of the progeny
2518 black, short-haired X = 75.5%
817 black, long-haired X = 24.5%
These percentages approximate to the phenotypic ratio 3:1 from a cross between two heterozygous individuals ⇒ 75% expressing the dominant trait and 25% expressing the recessive phenotype.
The first conclusion is that, knowing that there are two genes involved, if both parents were dihybrid, the expected ratios expressed by the progeny should be 9:3:3:1. But this is not the case. So parents must express a different genotype.
Let us analyze the phenotypes of the progeny.
About the hair length
Some of them are long-haired, and most of them are short-haired. This fact, together with the percentages calculated before, suggests that the parents are heter0zyg0us for the hair length trait. If this is the case, then 75% of the progeny should express the dominant phenotype, and only 25% the recessive one. The observed percentages coincides with the expected ones.Both parents must be heter0zyg0us for this trait, Ss.
About the color
All of them are black. This result suggests that at least one of the parents is h0m0zyg0us dominant for the trait, BB. The other parent could be either h0m0zyg0us recessive -bb- or heter0zyg0us -Bb-. The BB parent could only provide dominant alleles to the progeny, so the whole offpring expresses black color.
So, there are two possible options for parental genotype:
Option 1 ⇒ BBSs  and  BbSsOption 2 ⇒ BBSs  and  bbSs
Let us perform the crosses:
Option 1
Parentals) BBSs  x  BbSs
Gametes) BS, BS, Bs, Bs
         BS, Bs, bS, bs
Punnett square)       BS     BS     Bs    Bs
            BS    BBSS   BBSS   BBSs   BBSs
            Bs    BBSs   BBSs   BBss   BBss
            bS    BbSS   BbSS   BbSs   BbSs
            bs    BbSs   BbSs   Bbss   Bbss
F1) 12/16 B-S- = 0.75 B-S- = 75% of the progeny black and short-haired
   4/16 B- ss = 0.25 B-ss = 25% of the progeny black and long-haired
Option 2
Parentals) BBSs  x  bbSs
Gametes) BS, BS, Bs, Bs
         bS, bs, bS, bs
Punnett square)       BS     BS      Bs    Bs
            bS    BbSS   BbSS   BbSs   BbSs
            bs     BbSs   BbSs   Bbss   Bbss
            bS    BbSS   BbSS   BbSs   BbSs
            bs    BbSs   BbSs   Bbss   Bbss
F1) 12/16 BbS- = 0.75 BbS- = 75% of the progeny black and short-haired
   4/16 Bbss = 0.25 Bbss = 25% of the progeny black and long-haired
Both crosses result in the same phenotypic ratios of the progeny, meaning that both options are possible.
Related link: link
           link