For the real answer I would suggest re-posting your question in the retirement forum here and check for a reply by Alan S.
My guess is that you found the answer in Pub 590………so you exclude
$300 HSA payroll contribution. Since the Roth 401K contribution is not excluded from income and the additional HSA contributions are not coming from your paycheck, I don’t think you need to exclude them from available
Roth IRA contributions so you should have more than enough for your IRA contributions.