A baker used 40% of a 50kg bag of flour. If \(\frac{1}{8}\) of the amount used was for the cake, how many kilogram of flour was used for the cake?
A
2\(\frac{1}{2}\)
B
6\(\frac{1}{2}\)
C
15\(\frac{3}{8}\)
D
17\(\frac{1}{2}\)