Let G be a vertex-weighted graph with vertex-weighted function ω : V (G) → R + satisfying ω (v i) = x i for each v i ∈ V (G) = { v 1 , v 2 , ... , v n }. The weighted Wiener index of vertex-weighted graph G is defined as W (G ; x 1 , x 2 , ... , x n) = ∑ 1 ≤ i < j ≤ n x i x j d G (v i , v j) , where d G (v i , v j) denotes the distance between v i and v j in G. In this paper, we give a combinatorial explanation of W (G ; x 1 , x 2 , ... , x n) when G is a tree: W (G ; x 1 , x 2 , ... , x n) = m (S (G) , n − 2) ∏ i = 1 n x i , where m (S (G) , n − 2) is the sum of weights of matchings of some weighted subdivision S (G) of G with n − 2 edges. We also give a similar combinatorial explanation of the weighted Kirchhoff index K (G ; x 1 , x 2 , ... , x n) = ∑ 1 ≤ i < j ≤ n x i x j r G (v i , v j) of a unicyclic graph G , where r G (v i , v j) denotes the resistance distance between v i and v j in G. These results generalize some known formulae on the Wiener and Kirchhoff indices. • Give a combinatorial explanation of the weighted Wiener index of vertex weighted graphs. • Give a combinatorial explanation of the weighted Kirchhoff index of unicyclic graphs. • Generalize some known formulae on the Wiener and Kirchhoff indices of graphs. [ABSTRACT FROM AUTHOR]