Hi! The Darcy-Weisbach equation is written in terms of the Darcy friction factor (fD), whereas the second equation you posted is probably written in terms of the Fanning friction factor (fF), which is weird, because the problem provides the Darcy factor. The relationship between them is fD = 4fF, so both equations are correct depending on the friction factor you use. However, in your example, they just plugged in the 0.008, so yeah, there is something wrong with the calculation or the problem statement. This is actually a pretty common mistake. Is that from a textbook?
As a generalization, the Darcy friction factor is commonly used in mechanical engineering calculations, while the Fanning factor is used in chemical engineering calculations.