solve p_9