Retirement tax questions

I'm sitting here having a debate with someone and this was confirmation. That foreigners who didn't have a regular visa couldn't work. Thanks!