You can tell if you're gaining or losing space on another boat by lining up their boat with something on your boat (like the forestay or jib window).
How the background moves in relation to your view of the other boat will determine if you are moving faster or slower than they are, and can help decide where to cross their tack.
When in doubt, foot it out.