The keyword LET is optional in GW-BASIC (even in the original Dartmouth BASIC).
GW-BASIC has a modulo operator (MOD), so testing if A is divisible by B can be expressed much more concise with IF A MOD B=0 THEN ….
The loop that is expressed with increasing B, testing B and jumping to the loop start with GOTO would be easier to read if it is expressed as an actual FOR loop.
So the original program can be expressed like this:
10 INPUT "What is the number";A
20 FOR B=2 TO A
30 IF A MOD B=0 THEN PRINT "It is not a prime number.":END
40 NEXT
50 PRINT "It is a prime number."
This checks if A is divisible by itself in the last iteration which is always true. So we need to limit the upper limit of the iterations to A-1.
The other problem are numbers <2 for which the loop isn't run at all and are therefore identified as prime numbers. A simple hack to fix this would be testing for this and setting A to a known non-prime number >2.
10 INPUT "What is the number";A
20 IF A<2 THEN A=4:REM So that numbers <2 are reported as non-prime.
30 FOR B=2 TO A-1
40 IF A MOD B=0 THEN PRINT "It is not a prime number.":END
50 NEXT
60 PRINT "It is a prime number."