In both sentences, "as" is used incorrectly.
1. Correction: **As** I left school, I didn't know what to do.
2. Correction: We can walk to the hotel; **it** isn't far from here.
"As" is typically used to indicate a simultaneous action, and it should be followed by a clause that makes sense in that context. In the corrected sentences, the use of "as" aligns with proper grammar.