The Casimir theorem and the inversion problem in electrodynamics at first quantized level