Problems and solutions on electromagnetism