1) For K2MnO4; The oxidation state of Mn in KMnO4 is +7.
This can be obtained by taking into account the valencies of potassium and oxygen atoms.
The valency of Kis 1 but it loses electron so to be specific it is+1.
Similarly, oxygen in specific has a valency of −2.
2) For NaBH4; As the oxidation state of Na is +1 and Hydrogen is −1 because here hydrogen exists as a hydride.
Hence the oxidation state of boron is +3.