As pointed out by @Cyrus, you are not using bash; it seems that you are using PowerShell, in which case you could write:
(sam build) -and (sam local start-api --env-vars env.json)