For some reason, Y was not evaluated. You could check to see where the problem arises by evaluating each line in its own cell. Often just clearing the symbols, and re-running the code will solve the problem. However, I just copied your code and pasted into Mathematica, and the result was 0.0156334.
A simpler alternative in this case might be to globally assign your symbols to their input numerical values
r = 0.5; R = 0.3; f = 0.1; Y = 0.8;
k = ((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2;
A[k_] := EllipticK[k];
B[k_] := EllipticE[k];
(R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k])
This also gives the output as 0.0156334.