Computer B: VNC Server
Computer A: Client
1. Setup Computer B:
1.1 Go to system preferences
1.2. Open sharing
2. Setup Computer A (VNC client)
2.1 Install VNC Viewer
For this you need VNC viewer on the computer A, install VNC viewer on computer A.
you can download VNC Viewer here: RealVNC - Download VNC® Viewer
2.2 Start VNC viewer and connect using IP address you see it in step 1.2
that's it now you are connected to Computer B from Computer A via VNC.