Recursion Theorem : why does $SELF$ need $A$ and $B$ parts?
No, it can't.

Intuitively, $A$ can be described by print "B". Whatever $B$ is, there is such an $A$. Note that, by construction, $A$ is a program "longer" (roughly speaking) than $B$.

If we try to write $A$ as print "A", we incur in a problem, since $A$ should be "longer" than itself. Hence, such a definition is ill-posed.

For the same reason, you can't write a description of a TM inside its own finite control: you would need an infinite amount of states for that.



You can search the web for "quines": programs printing their own source code. Virtually all of them have to workaround the fact that they can't include their own source code in themselves, and have finite length. Hence, they must exploit something analogous to the $q()$ function you mention.

A typical quine can be designed as follows. Start from a clumsy attempt:

myself=""
print myself


Obvious partial fix: copy its source code within myself

myself="myself=\"\" \n print myself "
print myself


Not yet there: we should replicate the source code inside the innermost quotes, and so on, infinitely many times. Not good.

Instead, we use a placeholder for that "infinite" replication, which we replace at runtime with the whole code.

myself="myself=\"PH\" \n print myself "
print replace(myself, "PH", myself)


Obvious fix

myself="myself=\"PH\" \n print replace(myself, \"PH\", myself)"
print replace(myself, "PH", myself)


Assuming that replace only replaces the first occurrence of the placeholder PH, and that we fix the whitespace precisely in myself, this is now a program printing itself -- a quine.

Note how the replacement of PH must be done at runtime. Similarly, in the Sipser proof, we must compute q() at runtime -- we can't encode that in the finite control.