Price / earnings per share is equivalent to equity value / net income, as it is the same concept as on a per share basis.
If there is no debt, cash, minority interest, or preferred equity, then equity value is equal to enterprise value.
We can substitute enterprise value for equity value, so that we have enterprise value / net income = 20x.
The reciprocal of enterprise value / net income is net income / enterprise value = 1/20.
If we multiply net income / enterprise value with enterprise value / revenue, the numerator and denominator cancel out so we are left with net income / revenue.
This is equivalent to 1/20 x 5 = 5 / 20 = 1 / 4 = 25%. So the net income margin is 25%.