Magnetocrystalline anisotropy of Fe5PB2 and its alloys with Co and 5d elements: A combined first-principles and experimental study