On machine A (John)
create user accounts John and Jane
set share to allow John and Jane

On machine B (Jane)
create user accounts John and Jane
either John or Jane when logged in may access the share on machine A

On machine C (Sally)
only create Sally account
Sally may not use share on machine A, unless it is set to prompt for network credentials, in which case if Sally knew Johns or Janes Username/Password, Sally might still be able to access the share.