An inverse problem for a differential pencil using nodal points as data