The one-sided p-value is CDF[FRatioDistribution[n, m], x] if x is less than the median of the F-ratio distribution with n and m degrees of freedom, and 1-CDF[FRatioDistribution[n, m], x] otherwise.
The two-sided p-value is twice the one-sided p-value.