Well its a weapon so.....
MW Lance = 310gp cost
next to be enchanted at all it must have at least a +1 enhancement. <bonus squared x 2000gp>
1x1x2000gp = 2000gp
Lightning bolt ability, well you don;t say if its just a number of times per day, charges etc.. so i'll assume it's at will. <Command Word, Spell level x caster level x 2000gp>
we know its 5d6 damage your after so which you would have to be 5th to do and you also have to be 5th to cast 3rd level spells, so this tells us our caster level, the spell level is the level of Fireball which is 3rd... so
3x5x2000gp = 30,000gp
Total Base Cost = (310+2000+30,000) = 32,310gp
this is the Market Price.
Half the Market Price is the cost it would cost someone to make it, so in our case.
16,155gp to Make
The Experience point cost is 1/25th of the Base Cost (Market Price) which is
1292.4 (rounded down) so 1292 xp
As stated in the DMG it also take 1 Day for every 1000gp of value to make the item, well we know it costs 16.1K to make so that translates to.
16 Days to Create.
all this summed up leaves us with the following
Lightning Lance
Magically enchanted heavy lance, this lance is capable of firing on command a lightning bolt capable of doing 5d6 points of Damage, Reflex save (DC10+3+ <creators int or cha mod>) for half damage. The lightning bolt has a range of 150 feet. The lance otherwise functions as a +1 Heavy lance (see PHB).
Caster level: 5th; Prerequisites: Craft Arms & Armor, Lightning Bolt. Market Price: 32,310gp; Cost to Create: 16,155gp + 1292xp