why there are different oppacities for active and inactive icons
Because Material Design evolves and specs are updated inconsistently.
So I am confused in these two cases
Since IMO this is more a topic of color than of icons and because I don't remember seeing the tables in second link, I'd say the second link is more up-to-date and stick to it.
Design library's design_tint_password_toggle.xml
uses 54% and 38% which also suggests the second link is "correct".
For further reference as of 2016-11-09 these "correct" values are:
- Dark theme
- Active: 100% white icon on dark background
- Inactive: 50% white icon on dark background
- Light theme
- Active: 54% black icon on light background
- Inactive: 38% black icon on light background