If you don’t care about a used car, 22k mileage Maxima is not really bad. Probably, a brand new Accord is better in 1’st year. But, 4 years old Maxima may be better than 2 years old Accord from 2’nd year.
Also, you should consider about your yearly mlieage. If it is for only commute within 10~15 miles, Accord is good idea. But, if you have plan to drive it more than commute such as weekend driving or travel, then Maxima is better idea.