I have found the solution after some experimentation.
If the output PDF file is prefixed by a word [solved] and space (i.e. [solved]~<\jobname>.pdf), the command should be
"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance
-inverse-search ""C:/Program Files (x86)/texstudio/texstudio.exe" "%%f" -line %%l" ?a"[solved]" ?m.pdf
On the other hand, if it is appended by a space and a word [solved] (i.e. <\jobname>~[solved].pdf), the command should be
"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance
-inverse-search ""C:/Program Files (x86)/texstudio/texstudio.exe" "%%f" -line %%l" "?am ?"[solved]".pdf"
The key note here is to understand that a space is a terminating character, which needs to have a following ? in order to use further selectors/pathname parts/terminating characters.
For TeXstudio v3.0, unknowingly, the syntax of the first case has to be slightly modified to be
"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance
-inverse-search ""C:/Program Files (x86)/texstudio/texstudio.exe" "%%f" -line %%l" ?a"[solved]" "?m".pdf

"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search ""C:/Program Files (x86)/texstudio/texstudio.exe" "%%f" -line %%l" ?a [Exam]" ?m.pdf"– Diaa Sep 11 '20 at 18:11"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search ""C:/Program Files (x86)/texstudio/texstudio.exe" "%%f" -line %%l" ?a [Exam]" "?m".pdf– Diaa Sep 11 '20 at 18:11)is a terminating character for the selector?. So, it should be"C:\Program Files\SumatraPDF\SumatraPDF.exe" "?a)[Exam] ?m.pdf"– Diaa Sep 13 '20 at 12:38texfot −−quiet lualatex -synctex=1 -interaction=nonstopmode -shell-escape "\AtBeginDocument{\printanswersfalse}\input{%}"then call another user command to renamecmd.exe /C ren "?am.pdf" "[Exam] ?m.pdf". Check this for texfot and this for calling the command prompt. – Diaa Oct 09 '20 at 23:39