An eminent literary biographer and critic shows how poetry enriched the art of two representative English Romantic painters