Preparation of organic-inorganic phosphorus-nitrogen-based flame retardants and their application to plywood