We need more info. What B18 did you swap The B18A1 or B1, is it obo1 or 2, what obd is the car what is the year make and model. The codes make me want to check for spark and timing both ingition and mechanical. A quick check for unpluged sensors is alway good start simple. If you have access to a flow chart to troubel shot the codes that would be best.