OP,
How long do you have on the inbound leg, also when do you arrive at HND? My last trip it was about 45 minutes out of HND plane to the train with all of the QR codes. I'd add a couple of hours to comfortably get to NRT allowing for traffic with the Limousine Bus/taxi or using the trains (NEX or Skyliner). You'll still need to get checked in when you get to NRT and I'm not sure if Jetstar will count you being in line or if you actually have to be checked in.
Out bound you should be fine at 4 hours, all of the transfer options are still the same times either way. You really won't have very much time (if any) to see anything since you need to be checked in at minimum an hour before your flight and if your leaving at the "Right" times security can be a mess and they close the doors at T-20ish.