Finding the distance between active and farthest vertex in vertex selection
Vectors

Test script run in edit mode, with selected verts and a vertex as active selection. 

Sort the active verts by distance from active vert.
Select the last, ie the furthest vert, from active vert.
Use only the xy components of each to calculate the projected length required.

import bpy
import bmesh

context = bpy.context
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
# assume have active vert
av = bm.select_history.active
verts = [v for v in bm.verts if v.select]
#verts.remove(v)
verts.sort(key=lambda v:(av.co - v.co).length)
# furthest vert
fv = verts[-1]
# distance between verts
print((fv.co - av.co).length)
# distance disregarding local z component
print((fv.co.xy - av.co.xy).length)


Result when run on default cube, all verts selected

3.4641016151377544  # 2 * sqrt(3)
2.8284271247461903  # 2 * sqrt(2)